Java Code Examples for org.chromium.content.browser.ContentViewCore#setContentViewClient()
The following examples show how to use
org.chromium.content.browser.ContentViewCore#setContentViewClient() .
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: AwContents.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
private static ContentViewCore createAndInitializeContentViewCore(ViewGroup containerView, InternalAccessDelegate internalDispatcher, int nativeWebContents, ContentViewCore.GestureStateListener pinchGestureStateListener, ContentViewClient contentViewClient, ContentViewCore.ZoomControlsDelegate zoomControlsDelegate) { Context context = containerView.getContext(); ContentViewCore contentViewCore = new ContentViewCore(context); // Note INPUT_EVENTS_DELIVERED_IMMEDIATELY is passed to avoid triggering vsync in the // compositor, not because input events are delivered immediately. contentViewCore.initialize(containerView, internalDispatcher, nativeWebContents, context instanceof Activity ? new ActivityWindowAndroid((Activity) context) : new WindowAndroid(context), ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY); contentViewCore.setGestureStateListener(pinchGestureStateListener); contentViewCore.setContentViewClient(contentViewClient); contentViewCore.setZoomControlsDelegate(zoomControlsDelegate); return contentViewCore; }
Example 2
Source File: AwContents.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
private static ContentViewCore createAndInitializeContentViewCore(ViewGroup containerView, InternalAccessDelegate internalDispatcher, int nativeWebContents, ContentViewCore.GestureStateListener pinchGestureStateListener, ContentViewClient contentViewClient, ContentViewCore.ZoomControlsDelegate zoomControlsDelegate) { Context context = containerView.getContext(); ContentViewCore contentViewCore = new ContentViewCore(context); // Note INPUT_EVENTS_DELIVERED_IMMEDIATELY is passed to avoid triggering vsync in the // compositor, not because input events are delivered immediately. contentViewCore.initialize(containerView, internalDispatcher, nativeWebContents, context instanceof Activity ? new ActivityWindowAndroid((Activity) context) : new WindowAndroid(context), ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY); contentViewCore.setGestureStateListener(pinchGestureStateListener); contentViewCore.setContentViewClient(contentViewClient); contentViewCore.setZoomControlsDelegate(zoomControlsDelegate); return contentViewCore; }