OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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; |
| 6 |
| 7 import org.chromium.base.annotations.JNINamespace; |
| 8 import org.chromium.base.annotations.MainDex; |
| 9 |
| 10 /** |
| 11 * Java accessor for base/feature_list.h state. |
| 12 */ |
| 13 @JNINamespace("chrome::android") |
| 14 @MainDex |
| 15 public abstract class ChromeFeatureList { |
| 16 // Prevent instantiation. |
| 17 private ChromeFeatureList() {} |
| 18 |
| 19 /** |
| 20 * Returns whether the specified feature is enabled or not. |
| 21 * |
| 22 * Note: Features queried through this API must be added to the array |
| 23 * |kFeaturesExposedToJava| in chrome/browser/android/chrome_feature_list.cc |
| 24 * |
| 25 * @param featureName The name of the feature to query. |
| 26 * @return Whether the feature is enabled or not. |
| 27 */ |
| 28 public static boolean isEnabled(String featureName) { |
| 29 return nativeIsEnabled(featureName); |
| 30 } |
| 31 |
| 32 private static native boolean nativeIsEnabled(String featureName); |
| 33 } |
OLD | NEW |