| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/android/chrome_feature_list.h" | 5 #include "chrome/browser/android/chrome_feature_list.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 12 #include "base/feature_list.h" | 12 #include "base/feature_list.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "chrome/common/chrome_features.h" |
| 14 #include "jni/ChromeFeatureList_jni.h" | 15 #include "jni/ChromeFeatureList_jni.h" |
| 15 | 16 |
| 16 using base::android::ConvertJavaStringToUTF8; | 17 using base::android::ConvertJavaStringToUTF8; |
| 17 | 18 |
| 18 namespace chrome { | 19 namespace chrome { |
| 19 namespace android { | 20 namespace android { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| 23 // Array of features exposed through the Java ChromeFeatureList API. Entries in | 24 // Array of features exposed through the Java ChromeFeatureList API. Entries in |
| 24 // this array may either refer to features defined in this file (above) or in | 25 // this array may either refer to features defined in this file (above) or in |
| 25 // other locations in the code base (e.g. chrome/, components/, etc). | 26 // other locations in the code base (e.g. chrome/, components/, etc). |
| 26 const base::Feature* kFeaturesExposedToJava[] = { | 27 const base::Feature* kFeaturesExposedToJava[] = { |
| 27 &kNTPOfflinePagesFeature, | 28 &kNTPOfflinePagesFeature, |
| 28 &kNTPSnippetsFeature, | 29 &kNTPSnippetsFeature, |
| 29 &kPhysicalWebFeature, | 30 &kPhysicalWebFeature, |
| 31 &features::kSimplifiedFullscreenUI, |
| 30 }; | 32 }; |
| 31 | 33 |
| 32 } // namespace | 34 } // namespace |
| 33 | 35 |
| 34 const base::Feature kNTPOfflinePagesFeature { | 36 const base::Feature kNTPOfflinePagesFeature { |
| 35 "NTPOfflinePages", base::FEATURE_DISABLED_BY_DEFAULT | 37 "NTPOfflinePages", base::FEATURE_DISABLED_BY_DEFAULT |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 const base::Feature kNTPSnippetsFeature { | 40 const base::Feature kNTPSnippetsFeature { |
| 39 "NTPSnippets", base::FEATURE_DISABLED_BY_DEFAULT | 41 "NTPSnippets", base::FEATURE_DISABLED_BY_DEFAULT |
| (...skipping 19 matching lines...) Expand all Loading... |
| 59 NOTREACHED(); | 61 NOTREACHED(); |
| 60 return false; | 62 return false; |
| 61 } | 63 } |
| 62 | 64 |
| 63 bool RegisterChromeFeatureListJni(JNIEnv* env) { | 65 bool RegisterChromeFeatureListJni(JNIEnv* env) { |
| 64 return RegisterNativesImpl(env); | 66 return RegisterNativesImpl(env); |
| 65 } | 67 } |
| 66 | 68 |
| 67 } // namespace android | 69 } // namespace android |
| 68 } // namespace chrome | 70 } // namespace chrome |
| OLD | NEW |