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

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

Issue 1958233002: Reland of Update NTP to new material design spec. (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
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
index a0c2500de2d182aa32d3a340de56a08016880d57..0bf684ff3efc9c0c26eb463aef53ef1d0f4872e0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
@@ -11,7 +11,6 @@
import android.content.Context;
import android.content.Intent;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
@@ -582,9 +581,7 @@
mProfile = tab.getProfile();
mTitle = activity.getResources().getString(R.string.button_new_tab);
- mBackgroundColor = ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)
- ? ApiCompatibilityUtils.getColor(activity.getResources(), R.color.ntp_with_cards_bg)
- : ApiCompatibilityUtils.getColor(activity.getResources(), R.color.ntp_bg);
+ mBackgroundColor = NtpColorUtils.getBackgroundColorResource(activity.getResources());
mThemeColor = ApiCompatibilityUtils.getColor(
activity.getResources(), R.color.default_primary_color);
TemplateUrlService.getInstance().addObserver(this);
@@ -815,7 +812,9 @@
@Override
public int getThemeColor() {
- return isLocationBarShownInNTP() ? Color.WHITE : mThemeColor;
+ return isLocationBarShownInNTP()
+ ? NtpColorUtils.getBackgroundColorResource(mActivity.getResources())
+ : mThemeColor;
}
@Override

Powered by Google App Engine
This is Rietveld 408576698