Java Code Examples for org.chromium.content.browser.ContentViewCore#setContextualSearchClient()
The following examples show how to use
org.chromium.content.browser.ContentViewCore#setContextualSearchClient() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContextualSearchTabHelper.java From delion with Apache License 2.0 | 5 votes |
/** * Adds Contextual Search hooks for its client and listener to the given content view core. * @param cvc The content view core to attach the gesture state listener to. */ private void addContextualSearchHooks(ContentViewCore cvc) { ContextualSearchManager manager = getContextualSearchManager(); if (mGestureStateListener == null && manager != null) { mGestureStateListener = manager.getGestureStateListener(); cvc.addGestureStateListener(mGestureStateListener); cvc.setContextualSearchClient(manager); } }
Example 2
Source File: ContextualSearchTabHelper.java From delion with Apache License 2.0 | 5 votes |
/** * Removes Contextual Search hooks for its client and listener from the given content view core. * @param cvc The content view core to detach the gesture state listener from. */ private void removeContextualSearchHooks(ContentViewCore cvc) { if (cvc == null) return; if (mGestureStateListener != null) { cvc.removeGestureStateListener(mGestureStateListener); mGestureStateListener = null; cvc.setContextualSearchClient(null); } }
Example 3
Source File: ContextualSearchTabHelper.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Adds Contextual Search hooks for its client and listener to the given content view core. * @param cvc The content view core to attach the gesture state listener to. */ private void addContextualSearchHooks(ContentViewCore cvc) { ContextualSearchManager manager = getContextualSearchManager(); if (mGestureStateListener == null && manager != null) { mGestureStateListener = manager.getGestureStateListener(); cvc.addGestureStateListener(mGestureStateListener); cvc.setContextualSearchClient(manager); } }
Example 4
Source File: ContextualSearchTabHelper.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Removes Contextual Search hooks for its client and listener from the given content view core. * @param cvc The content view core to detach the gesture state listener from. */ private void removeContextualSearchHooks(ContentViewCore cvc) { if (cvc == null) return; if (mGestureStateListener != null) { cvc.removeGestureStateListener(mGestureStateListener); mGestureStateListener = null; cvc.setContextualSearchClient(null); } }