Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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.content.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("content::android") | |
| 14 @MainDex | |
| 15 public class ContentFeatureList { | |
|
Ilya Sherman
2017/03/16 17:38:53
Hmm, why did you remove "abstract" here? Should i
chongz
2017/03/16 18:54:04
I'm not an expert on Java but I don't feel that we
Ilya Sherman
2017/03/16 18:59:12
Okay. I suspect it was to help ensure that nobody
chongz
2017/03/16 19:16:54
Oh I see, that sounds reasonable. Anyway I've adde
| |
| 16 // Prevent instantiation. | |
| 17 private ContentFeatureList() {} | |
| 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 content/browser/android/content_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 // Alphabetical: | |
| 33 public static final String REQUEST_UNBUFFERED_DISPATCH = "RequestUnbufferedD ispatch"; | |
| 34 | |
| 35 private static native boolean nativeIsEnabled(String featureName); | |
| 36 } | |
| OLD | NEW |