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
3 // found in the LICENSE file.
5 #include "chrome/browser/android/feature_utilities.h"
7 #include "jni/FeatureUtilities_jni.h"
10 bool document_mode_enabled
= false;
11 bool custom_tab_visible
= false;
17 RunningModeHistogram
GetDocumentModeValue() {
18 return document_mode_enabled
? RUNNING_MODE_DOCUMENT_MODE
:
19 RUNNING_MODE_TABBED_MODE
;
22 CustomTabsVisibilityHistogram
GetCustomTabsVisibleValue() {
23 return custom_tab_visible
? VISIBLE_CUSTOM_TAB
:
27 } // namespace android
30 static void SetDocumentModeEnabled(JNIEnv
* env
,
31 const JavaParamRef
<jclass
>& clazz
,
33 document_mode_enabled
= enabled
;
36 static void SetCustomTabVisible(JNIEnv
* env
,
37 const JavaParamRef
<jclass
>& clazz
,
39 custom_tab_visible
= visible
;
42 bool RegisterFeatureUtilities(JNIEnv
* env
) {
43 return RegisterNativesImpl(env
);