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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java

Issue 896093007: [Android] Open up API in jni bridge to fetch images from tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits fixes Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/enhanced_bookmarks/android/enhanced_bookmarks_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java
index 3ff5ecc0ca3f2ab4ef9cada36b302c29e572cba3..14a0c0dacbddbe2cae82621fe4217e335115faf4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java
@@ -13,6 +13,7 @@ import org.chromium.base.JNINamespace;
import org.chromium.base.ObserverList;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.bookmarks.BookmarkId;
+import org.chromium.content_public.browser.WebContents;
import java.util.ArrayList;
import java.util.Arrays;
@@ -246,6 +247,14 @@ public final class EnhancedBookmarksBridge {
}
/**
+ * Parses the web content of a tab, and stores salient images to local database.
+ * @param webContents Contents of the tab that the user is currently in.
+ */
+ public void fetchImageForTab(WebContents webContents) {
+ nativeFetchImageForTab(mNativeEnhancedBookmarksBridge, webContents);
+ }
+
+ /**
* Get all filters associated with the given bookmark.
*
* @param bookmark The bookmark to find filters for.
@@ -310,6 +319,8 @@ public final class EnhancedBookmarksBridge {
private native BookmarkId nativeAddBookmark(long nativeEnhancedBookmarksBridge,
BookmarkId parent, int index, String title, String url);
private native void nativeSendSearchRequest(long nativeEnhancedBookmarksBridge, String query);
- private static native void nativeSalientImageForUrl(long nativeEnhancedBookmarksBridge,
+ private native void nativeSalientImageForUrl(long nativeEnhancedBookmarksBridge,
String url, SalientImageCallback callback);
+ private native void nativeFetchImageForTab(long nativeEnhancedBookmarksBridge,
+ WebContents webContents);
}
« no previous file with comments | « no previous file | chrome/browser/enhanced_bookmarks/android/enhanced_bookmarks_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698