| 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 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. | 58 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. |
| 59 &offline_pages::kOfflinePagesSharingFeature, | 59 &offline_pages::kOfflinePagesSharingFeature, |
| 60 &password_manager::features::kViewPasswords, | 60 &password_manager::features::kViewPasswords, |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace | 63 } // namespace |
| 64 | 64 |
| 65 const base::Feature kAllBookmarksFeature{"AllBookmarks", | 65 const base::Feature kAllBookmarksFeature{"AllBookmarks", |
| 66 base::FEATURE_ENABLED_BY_DEFAULT}; | 66 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 67 | 67 |
| 68 const base::Feature kAndroidPayIntegrationV1{"AndroidPayIntegrationV1", |
| 69 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 70 |
| 68 const base::Feature kDownloadsUiFeature{"DownloadsUi", | 71 const base::Feature kDownloadsUiFeature{"DownloadsUi", |
| 69 base::FEATURE_DISABLED_BY_DEFAULT}; | 72 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 70 | 73 |
| 71 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", | 74 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", |
| 72 base::FEATURE_DISABLED_BY_DEFAULT}; | 75 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 73 | 76 |
| 74 const base::Feature kNTPMaterialDesign{"NTPMaterialDesign", | 77 const base::Feature kNTPMaterialDesign{"NTPMaterialDesign", |
| 75 base::FEATURE_ENABLED_BY_DEFAULT}; | 78 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 76 | 79 |
| 77 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages", | 80 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages", |
| 78 base::FEATURE_DISABLED_BY_DEFAULT}; | 81 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 79 | 82 |
| 80 const base::Feature kNTPFakeOmniboxTextFeature{ | 83 const base::Feature kNTPFakeOmniboxTextFeature{ |
| 81 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT}; | 84 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 82 | 85 |
| 83 const base::Feature kAndroidPayIntegrationV1{"AndroidPayIntegrationV1", | |
| 84 base::FEATURE_ENABLED_BY_DEFAULT}; | |
| 85 | |
| 86 const base::Feature kPhysicalWebFeature{"PhysicalWeb", | 86 const base::Feature kPhysicalWebFeature{"PhysicalWeb", |
| 87 base::FEATURE_ENABLED_BY_DEFAULT}; | 87 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 88 | 88 |
| 89 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{ | 89 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{ |
| 90 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT}; | 90 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 91 | 91 |
| 92 const base::Feature kReadItLaterInMenu{"ReadItLaterInMenu", | 92 const base::Feature kReadItLaterInMenu{"ReadItLaterInMenu", |
| 93 base::FEATURE_DISABLED_BY_DEFAULT}; | 93 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 94 | 94 |
| 95 const base::Feature kScanCardsInWebPayments{"ScanCardsInWebPayments", | 95 const base::Feature kScanCardsInWebPayments{"ScanCardsInWebPayments", |
| 96 base::FEATURE_DISABLED_BY_DEFAULT}; | 96 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 97 | 97 |
| 98 const base::Feature kSpecialLocaleFeature{"SpecialLocale", | 98 const base::Feature kSpecialLocaleFeature{"SpecialLocale", |
| 99 base::FEATURE_DISABLED_BY_DEFAULT}; | 99 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 100 | 100 |
| 101 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper", | 101 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper", |
| 102 base::FEATURE_ENABLED_BY_DEFAULT}; | 102 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 103 | 103 |
| 104 const base::Feature kSystemDownloadManager{"SystemDownloadManager", | 104 const base::Feature kSystemDownloadManager{"SystemDownloadManager", |
| 105 base::FEATURE_ENABLED_BY_DEFAULT}; | 105 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 106 | 106 |
| 107 const base::Feature kTabReparenting { | 107 const base::Feature kTabReparenting{"TabReparenting", |
| 108 "TabReparenting", base::FEATURE_ENABLED_BY_DEFAULT | 108 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 109 }; | 109 |
| 110 const base::Feature kUserMediaScreenCapturing{ |
| 111 "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 110 | 112 |
| 111 static jboolean IsEnabled(JNIEnv* env, | 113 static jboolean IsEnabled(JNIEnv* env, |
| 112 const JavaParamRef<jclass>& clazz, | 114 const JavaParamRef<jclass>& clazz, |
| 113 const JavaParamRef<jstring>& jfeature_name) { | 115 const JavaParamRef<jstring>& jfeature_name) { |
| 114 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); | 116 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); |
| 115 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { | 117 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { |
| 116 if (kFeaturesExposedToJava[i]->name == feature_name) | 118 if (kFeaturesExposedToJava[i]->name == feature_name) |
| 117 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); | 119 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); |
| 118 } | 120 } |
| 119 // Features queried via this API must be present in |kFeaturesExposedToJava|. | 121 // Features queried via this API must be present in |kFeaturesExposedToJava|. |
| 120 NOTREACHED(); | 122 NOTREACHED(); |
| 121 return false; | 123 return false; |
| 122 } | 124 } |
| 123 | 125 |
| 124 bool RegisterChromeFeatureListJni(JNIEnv* env) { | 126 bool RegisterChromeFeatureListJni(JNIEnv* env) { |
| 125 return RegisterNativesImpl(env); | 127 return RegisterNativesImpl(env); |
| 126 } | 128 } |
| 127 | 129 |
| 128 } // namespace android | 130 } // namespace android |
| 129 } // namespace chrome | 131 } // namespace chrome |
| OLD | NEW |