summaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-11-04 12:47:54 +0000
committerBen Murdoch <benm@google.com>2014-11-12 17:25:55 +0000
commit36b0a0d250253f649c9200b73abbeb61fbc31292 (patch)
tree5c918ff5333b2163bc6ae7c1ef1111f4de1324b2 /chromium
parent81fb32c83e2964edaae128bf752c03c4bef8cd26 (diff)
downloadandroid_frameworks_webview-36b0a0d250253f649c9200b73abbeb61fbc31292.tar.gz
android_frameworks_webview-36b0a0d250253f649c9200b73abbeb61fbc31292.tar.bz2
android_frameworks_webview-36b0a0d250253f649c9200b73abbeb61fbc31292.zip
Add support for SmartClip interface in the glue layer.
Bug: 18222974 Change-Id: Ie39d49e9dfe90f20b6eb5d28009313781eac8e01
Diffstat (limited to 'chromium')
-rw-r--r--chromium/java/com/android/webview/chromium/WebViewChromium.java19
-rw-r--r--chromium/proguard.flags6
2 files changed, 24 insertions, 1 deletions
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromium.java b/chromium/java/com/android/webview/chromium/WebViewChromium.java
index a8b6fb5..b709207 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromium.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromium.java
@@ -32,6 +32,7 @@ import android.net.http.SslCertificate;
import android.os.Build;
import android.os.Bundle;
import android.os.Looper;
+import android.os.Handler;
import android.os.Message;
import android.print.PrintDocumentAdapter;
import android.text.TextUtils;
@@ -70,6 +71,7 @@ import org.chromium.android_webview.AwLayoutSizer;
import org.chromium.android_webview.AwSettings;
import org.chromium.android_webview.AwPrintDocumentAdapter;
import org.chromium.base.ThreadUtils;
+import org.chromium.content.browser.SmartClipProvider;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.net.NetworkChangeNotifier;
@@ -93,7 +95,7 @@ import java.util.Queue;
* and a small set of no-op deprecated APIs.
*/
class WebViewChromium implements WebViewProvider,
- WebViewProvider.ScrollDelegate, WebViewProvider.ViewDelegate {
+ WebViewProvider.ScrollDelegate, WebViewProvider.ViewDelegate, SmartClipProvider {
private class WebViewChromiumRunQueue {
public WebViewChromiumRunQueue() {
@@ -2251,4 +2253,19 @@ class WebViewChromium implements WebViewProvider,
return mWebViewPrivate.super_onHoverEvent(event);
}
}
+
+ // Implements SmartClipProvider
+ @Override
+ public void extractSmartClipData(int x, int y, int width, int height) {
+ checkThread();
+ mAwContents.extractSmartClipData(x, y, width, height);
+ }
+
+ // Implements SmartClipProvider
+ @Override
+ public void setSmartClipResultHandler(final Handler resultHandler) {
+ checkThread();
+ mAwContents.setSmartClipResultHandler(resultHandler);
+ }
+
}
diff --git a/chromium/proguard.flags b/chromium/proguard.flags
index 6401a8c..b19519f 100644
--- a/chromium/proguard.flags
+++ b/chromium/proguard.flags
@@ -80,6 +80,12 @@
*** startFinalizer(java.lang.Class,java.lang.Object);
}
+# Keep support framework support for SmartClip.
+-keep class com.android.webview.chromium.WebViewChromium {
+ public void extractSmartClipData(int,int,int,int);
+ public void setSmartClipResultHandler(android.os.Handler);
+}
+
# We need to explicitly keep classes and constructors referenced only in
# layout resources.
-keep class com.android.org.chromium.ui.ColorPickerAdvanced {