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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/SmartClipProvider.java

Issue 372693003: [Android] Fix smart clip callback to include URI and title (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: really removed mSmartClipResultHandler Created 6 years, 5 months 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: content/public/android/java/src/org/chromium/content/browser/SmartClipProvider.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/SmartClipProvider.java b/content/public/android/java/src/org/chromium/content/browser/SmartClipProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..346f21772df9bd0d86b47c80d9fb9e94e0e0a20b
--- /dev/null
+++ b/content/public/android/java/src/org/chromium/content/browser/SmartClipProvider.java
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.content.browser;
+
+import android.os.Handler;
+
+/**
+ * An interface to provide smart clip data when requested.
+ *
+ * NOTE: Some platforms may call these functions to extract smart clip data.
+ * Please make sure implementation of them is somewhere in the view
+ * hierarchy.
+ */
+public interface SmartClipProvider {
+ /**
+ * Initiate extraction of text, HTML, and other information for clipping puposes (smart clip)
+ * from the rectangle area defined by starting positions (x and y), and width and height.
+ */
+ void extractSmartClipData(int x, int y, int width, int height);
+
+ /**
+ * Register a handler to handle smart clip data once extraction is done.
+ */
+ void setSmartClipResultHandler(final Handler resultHandler);
+}

Powered by Google App Engine
This is Rietveld 408576698