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

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

Issue 1993253002: Fix omnibox flashing on phones when switching between foreground/background NTPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java » ('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/compositor/layouts/LayoutManagerDocument.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java
index d6548123c840745b5ef77cb352b649df11b1c455..72d3c3f2df0a107029c15f2d71cf6ce69837ab48 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java
@@ -71,6 +71,8 @@ public class LayoutManagerDocument extends LayoutManager
/** A delegate for interacting with the Contextual Search manager. */
protected ContextualSearchManagementDelegate mContextualSearchDelegate;
+ private final Context mContext;
+
@SuppressWarnings("unused") private TabModelSelectorTabObserver mTabModelSelectorTabObserver;
/**
@@ -79,7 +81,7 @@ public class LayoutManagerDocument extends LayoutManager
*/
public LayoutManagerDocument(LayoutManagerHost host) {
super(host);
- Context context = host.getContext();
+ mContext = host.getContext();
LayoutRenderHost renderHost = host.getLayoutRenderHost();
// Build Event Filter Handlers
@@ -88,20 +90,20 @@ public class LayoutManagerDocument extends LayoutManager
// Build Event Filters
mStaticEdgeEventFilter =
- new EdgeSwipeEventFilter(context, this, new StaticEdgeSwipeHandler());
+ new EdgeSwipeEventFilter(mContext, this, new StaticEdgeSwipeHandler());
mOverlayPanelManager = new OverlayPanelManager();
// Build Layouts
mStaticLayout = new StaticLayout(
- context, this, renderHost, mStaticEdgeEventFilter, mOverlayPanelManager);
+ mContext, this, renderHost, mStaticEdgeEventFilter, mOverlayPanelManager);
// Contextual Search scene overlay.
- mContextualSearchPanel = new ContextualSearchPanel(context, this, this,
- mOverlayPanelManager);
+ mContextualSearchPanel =
+ new ContextualSearchPanel(mContext, this, this, mOverlayPanelManager);
// Reader Mode scene overlay.
- mReaderModePanel = new ReaderModePanel(context, this, this, mOverlayPanelManager, this);
+ mReaderModePanel = new ReaderModePanel(mContext, this, this, mOverlayPanelManager, this);
// Set up layout parameters
mStaticLayout.setLayoutHandlesTabLifecycles(true);
@@ -253,8 +255,8 @@ public class LayoutManagerDocument extends LayoutManager
boolean canUseLiveTexture =
tab.getContentViewCore() != null && !tab.isShowingSadTab() && !isNativePage;
layoutTab.initFromHost(tab.getBackgroundColor(), tab.shouldStall(), canUseLiveTexture,
- themeColor,
- ColorUtils.getTextBoxColorForToolbarBackground(themeColor),
+ themeColor, ColorUtils.getTextBoxColorForToolbarBackground(
+ mContext.getResources(), tab, themeColor),
ColorUtils.getTextBoxAlphaForToolbarBackground(tab));
mHost.requestRender();
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698