OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.util; | 5 package org.chromium.chrome.browser.util; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 Log.d(TAG, "Caching flavor: " + newFlavor); | 245 Log.d(TAG, "Caching flavor: " + newFlavor); |
246 sCachedHerbFlavor = newFlavor; | 246 sCachedHerbFlavor = newFlavor; |
247 | 247 |
248 if (!TextUtils.equals(oldFlavor, newFlavor)) { | 248 if (!TextUtils.equals(oldFlavor, newFlavor)) { |
249 ChromePreferenceManager.getInstance(context).setCachedHerbFlavor(new
Flavor); | 249 ChromePreferenceManager.getInstance(context).setCachedHerbFlavor(new
Flavor); |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 /** | 253 /** |
254 * @return True if theme colors in the tab switcher are enabled. | |
255 */ | |
256 public static boolean areTabSwitcherThemeColorsEnabled() { | |
257 return CommandLine.getInstance().hasSwitch( | |
258 ChromeSwitches.ENABLE_TAB_SWITCHER_THEME_COLORS); | |
259 } | |
260 | |
261 /** | |
262 * @return True if tab model merging for Android N+ is enabled. | 254 * @return True if tab model merging for Android N+ is enabled. |
263 */ | 255 */ |
264 public static boolean isTabModelMergingEnabled() { | 256 public static boolean isTabModelMergingEnabled() { |
265 return Build.VERSION.SDK_INT > Build.VERSION_CODES.M; | 257 return Build.VERSION.SDK_INT > Build.VERSION_CODES.M; |
266 } | 258 } |
267 | 259 |
268 private static native void nativeSetDocumentModeEnabled(boolean enabled); | 260 private static native void nativeSetDocumentModeEnabled(boolean enabled); |
269 private static native void nativeSetCustomTabVisible(boolean visible); | 261 private static native void nativeSetCustomTabVisible(boolean visible); |
270 private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWin
dowMode); | 262 private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWin
dowMode); |
271 } | 263 } |
OLD | NEW |