Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2213)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 2407303005: Let embedder provide select action mode (Closed)
Patch Set: more comments addressed Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index afbb0926d606d4193f8fdc32546768171954e942..c62f906dcc4bf0bb2470a6be02886b7b4dc0257a 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -28,6 +28,7 @@ import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Pair;
+import android.view.ActionMode;
import android.view.DragEvent;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -809,8 +810,9 @@ public class AwContents implements SmartClipProvider,
InternalAccessDelegate internalDispatcher, WebContents webContents,
GestureStateListener gestureStateListener, ContentViewClient contentViewClient,
ContentViewCore.ZoomControlsDelegate zoomControlsDelegate,
- WindowAndroid windowAndroid) {
- contentViewCore.initialize(viewDelegate, internalDispatcher, webContents, windowAndroid);
+ WindowAndroid windowAndroid, ActionMode.Callback actionModeCallback) {
+ contentViewCore.initialize(viewDelegate, internalDispatcher, webContents, windowAndroid,
+ actionModeCallback);
contentViewCore.addGestureStateListener(gestureStateListener);
contentViewCore.setContentViewClient(contentViewClient);
contentViewCore.setZoomControlsDelegate(zoomControlsDelegate);
@@ -1045,7 +1047,8 @@ public class AwContents implements SmartClipProvider,
mContentViewCore.getRenderCoordinates());
initializeContentViewCore(mContentViewCore, mContext, mViewAndroidDelegate,
mInternalAccessAdapter, webContents, new AwGestureStateListener(),
- mContentViewClient, mZoomControls, mWindowAndroid.getWindowAndroid());
+ mContentViewClient, mZoomControls, mWindowAndroid.getWindowAndroid(),
+ new AwActionModeCallback(this));
nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge,
mIoThreadClient, mInterceptNavigationDelegate);
mWebContents = mContentViewCore.getWebContents();

Powered by Google App Engine
This is Rietveld 408576698