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

Unified Diff: android_webview/native/aw_contents.cc

Issue 25878003: [Android WebView] Add an API to control favicon loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index bbf71c2443fb0585e3661882c090fbad859bcd21..a8a81e9e9989f69d7d544986c6408a403e5d7f5b 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -91,6 +91,8 @@ namespace android_webview {
namespace {
+bool g_should_download_favicons = false;
+
JavaBrowserViewRendererHelper* java_renderer_helper() {
return JavaBrowserViewRendererHelper::GetInstance();
}
@@ -553,6 +555,10 @@ void AwContents::OnFindResultReceived(int active_ordinal,
env, obj.obj(), active_ordinal, match_count, finished);
}
+bool AwContents::ShouldDownloadFavicon(const GURL& icon_url) {
+ return g_should_download_favicons;
+}
+
void AwContents::OnReceivedIcon(const GURL& icon_url, const SkBitmap& bitmap) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
@@ -902,4 +908,8 @@ void AwContents::TrimMemory(JNIEnv* env, jobject obj, jint level) {
browser_view_renderer_->TrimMemory(level);
}
+void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
+ g_should_download_favicons = true;
+}
+
} // namespace android_webview
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698