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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java

Issue 1268483004: Plumb the anonymize rect color to toolbar_layer from Tab#getThemeColor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tabHasThemeColor
Patch Set: Renamed BrandColorUtils in implementation Created 5 years, 4 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: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
index df7a32eb0e27d787e898c9973b6b8efec3e7c4a6..faa88abf65d1ce4cb591c22d087813079c267813 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
@@ -122,6 +122,8 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
/** The color of the background of the tab. Used as the best approximation to fill in. */
private int mBackgroundColor = Color.WHITE;
+ private int mTextBoxBackgroundColor = Color.WHITE;
+
private int mFallbackThumbnailId = Tab.INVALID_TAB_ID;
// End section --------------
@@ -206,8 +208,9 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
* @param canUseLiveTexture Whether the tab can use a live texture when being displayed.
*/
public void initFromHost(int backgroundColor, int fallbackThumbnailId, boolean shouldStall,
- boolean canUseLiveTexture) {
+ boolean canUseLiveTexture, int textBoxBackgroundColor) {
mBackgroundColor = backgroundColor;
+ mTextBoxBackgroundColor = textBoxBackgroundColor;
mFallbackThumbnailId = fallbackThumbnailId;
mShouldStall = shouldStall;
mCanUseLiveTexture = canUseLiveTexture;
@@ -868,6 +871,13 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
}
/**
+ * @return The color of the textbox in the toolbar. Used as the color for the anonymize rect.
+ */
+ public int getTextBoxBackgroundColor() {
+ return mTextBoxBackgroundColor;
+ }
+
+ /**
* @return The id of a snapshot that would be acceptable to use if the snapshot for this tab
* is unavailable.
*/

Powered by Google App Engine
This is Rietveld 408576698