Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: chrome/browser/android/feature_utilities.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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/feature_utilities.h" 5 #include "chrome/browser/android/feature_utilities.h"
6 6
7 #include "jni/FeatureUtilities_jni.h" 7 #include "jni/FeatureUtilities_jni.h"
8 8
9 namespace { 9 namespace {
10 bool document_mode_enabled = false; 10 bool document_mode_enabled = false;
11 bool custom_tab_visible = false; 11 bool custom_tab_visible = false;
12 } // namespace 12 } // namespace
13 13
14 namespace chrome { 14 namespace chrome {
15 namespace android { 15 namespace android {
16 16
17 RunningModeHistogram GetDocumentModeValue() { 17 RunningModeHistogram GetDocumentModeValue() {
18 return document_mode_enabled ? RUNNING_MODE_DOCUMENT_MODE : 18 return document_mode_enabled ? RUNNING_MODE_DOCUMENT_MODE :
19 RUNNING_MODE_TABBED_MODE; 19 RUNNING_MODE_TABBED_MODE;
20 } 20 }
21 21
22 CustomTabsVisibilityHistogram GetCustomTabsVisibleValue() { 22 CustomTabsVisibilityHistogram GetCustomTabsVisibleValue() {
23 return custom_tab_visible ? VISIBLE_CUSTOM_TAB : 23 return custom_tab_visible ? VISIBLE_CUSTOM_TAB :
24 VISIBLE_CHROME_TAB; 24 VISIBLE_CHROME_TAB;
25 } 25 }
26 26
27 } // namespace android 27 } // namespace android
28 } // namespace chrome 28 } // namespace chrome
29 29
30
31 static void SetDocumentModeEnabled(JNIEnv* env, 30 static void SetDocumentModeEnabled(JNIEnv* env,
32 jclass clazz, 31 const JavaParamRef<jclass>& clazz,
33 jboolean enabled) { 32 jboolean enabled) {
34 document_mode_enabled = enabled; 33 document_mode_enabled = enabled;
35 } 34 }
36 35
37 static void SetCustomTabVisible(JNIEnv* env, 36 static void SetCustomTabVisible(JNIEnv* env,
38 jclass clazz, 37 const JavaParamRef<jclass>& clazz,
39 jboolean visible) { 38 jboolean visible) {
40 custom_tab_visible = visible; 39 custom_tab_visible = visible;
41 } 40 }
42 41
43 bool RegisterFeatureUtilities(JNIEnv* env) { 42 bool RegisterFeatureUtilities(JNIEnv* env) {
44 return RegisterNativesImpl(env); 43 return RegisterNativesImpl(env);
45 } 44 }
OLDNEW
« no previous file with comments | « chrome/browser/android/favicon_helper.cc ('k') | chrome/browser/android/feedback/connectivity_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698