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

Unified Diff: content/browser/web_contents/web_contents_android.cc

Issue 975293004: Start caching the theme color in web_contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/web_contents/web_contents_android.cc
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index 5a89df69f203be45e6a06a4d23745eb3be6a0eba..07d66310c5c166cf565545e69da94d202a2bd8ca 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -165,6 +165,13 @@ jint WebContentsAndroid::GetBackgroundColor(JNIEnv* env, jobject obj) {
return rwhva->GetCachedBackgroundColor();
}
+jint WebContentsAndroid::GetThemeColor(JNIEnv* env, jobject obj) {
+ RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
+ if (!rwhva)
+ return SK_ColorWHITE;
+ return rwhva->GetThemeColor();
+}
+
ScopedJavaLocalRef<jstring> WebContentsAndroid::GetURL(JNIEnv* env,
jobject obj) const {
return ConvertUTF8ToJavaString(env, web_contents_->GetURL().spec());

Powered by Google App Engine
This is Rietveld 408576698