Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / android / feature_utilities.cc
blobbcfebfb562f5a129b14888cd020b8c9ecb33ae51
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"
9 namespace {
10 bool document_mode_enabled = false;
11 bool custom_tab_visible = false;
12 } // namespace
14 namespace chrome {
15 namespace android {
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 :
24 VISIBLE_CHROME_TAB;
27 } // namespace android
28 } // namespace chrome
31 static void SetDocumentModeEnabled(JNIEnv* env,
32 jclass clazz,
33 jboolean enabled) {
34 document_mode_enabled = enabled;
37 static void SetCustomTabVisible(JNIEnv* env,
38 jclass clazz,
39 jboolean visible) {
40 custom_tab_visible = visible;
43 static jboolean GetCustomTabVisible(JNIEnv* env,
44 jclass clazz) {
45 return custom_tab_visible;
48 bool RegisterFeatureUtilities(JNIEnv* env) {
49 return RegisterNativesImpl(env);