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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NtpColorUtils.java

Issue 1960553003: 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 {
Bernhard Bauer 2016/05/06 15:58:41 Add a private constructor to prevent instantiation
May 2016/05/06 16:04:21 Done.
18 public static int getBackgroundColorResource(Resources res) {
19 return (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)
20 || ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_MATE RIAL_DESIGN))
21 ? ApiCompatibilityUtils.getColor(res, R.color.ntp_material_desig n_bg)
22 : ApiCompatibilityUtils.getColor(res, R.color.ntp_bg);
23 }
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698