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

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

Issue 364793005: Implementation of GetFavicon for current tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Scaled favicon image to 16x16 size 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
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | chrome/browser/android/tab_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
index ecc4529617952ece3609534d31240d2fd6515b2a..15f9ffc2b7d4055035db194c57c79be92e062de1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -880,10 +880,11 @@ public class Tab implements NavigationClient {
/**
* @return The bitmap of the favicon scaled to 16x16dp. null if no favicon
* is specified or it requires the default favicon.
- * TODO(bauerb): Upstream implementation.
*/
public Bitmap getFavicon() {
- return null;
+ if (mNativeTabAndroid == 0)
+ return null;
+ return nativeGetFavicon(mNativeTabAndroid);
}
/**
@@ -1151,4 +1152,5 @@ public class Tab implements NavigationClient {
private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url,
String title);
private native boolean nativePrint(long nativeTabAndroid);
+ private native Bitmap nativeGetFavicon(long nativeTabAndroid);
}
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | chrome/browser/android/tab_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698