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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.ntp;
6
7 import android.content.res.Resources;
8
9 import org.chromium.base.ApiCompatibilityUtils;
10 import org.chromium.chrome.R;
11 import org.chromium.chrome.browser.ChromeFeatureList;
12
13 /**
14 * Utility class for figuring out which colors to use for the NTP. This class is needed while we
15 * transition the NTP to the new material design spec.
16 */
17 public class NtpColorUtils {
18
19 private NtpColorUtils() {}
20
21 public static int getBackgroundColorResource(Resources res) {
22 return (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)
23 || ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_MATE RIAL_DESIGN))
24 ? ApiCompatibilityUtils.getColor(res, R.color.ntp_material_desig n_bg)
25 : ApiCompatibilityUtils.getColor(res, R.color.ntp_bg);
26 }
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698