Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |