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

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

Issue 687733006: Move getBrowserUserAgent() under ChromiumApplication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromiumApplication.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromium_application.h" 5 #include "chrome/browser/android/chromium_application.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
8 #include "chrome/browser/android/tab_android.h" 9 #include "chrome/browser/android/tab_android.h"
10 #include "chrome/common/chrome_content_client.h"
9 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
10 #include "jni/ChromiumApplication_jni.h" 12 #include "jni/ChromiumApplication_jni.h"
11 13
14 using base::android::ConvertUTF8ToJavaString;
15
16 static jstring GetBrowserUserAgent(JNIEnv* env, jclass clazz) {
17 return ConvertUTF8ToJavaString(env, GetUserAgent()).Release();
18 }
19
12 namespace chrome { 20 namespace chrome {
13 namespace android { 21 namespace android {
14 22
15 // static 23 // static
16 bool ChromiumApplication::RegisterBindings(JNIEnv* env) { 24 bool ChromiumApplication::RegisterBindings(JNIEnv* env) {
17 return RegisterNativesImpl(env); 25 return RegisterNativesImpl(env);
18 } 26 }
19 27
20 void ChromiumApplication::OpenProtectedContentSettings() { 28 void ChromiumApplication::OpenProtectedContentSettings() {
21 Java_ChromiumApplication_openProtectedContentSettings( 29 Java_ChromiumApplication_openProtectedContentSettings(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 66 }
59 67
60 bool ChromiumApplication::AreParentalControlsEnabled() { 68 bool ChromiumApplication::AreParentalControlsEnabled() {
61 return Java_ChromiumApplication_areParentalControlsEnabled( 69 return Java_ChromiumApplication_areParentalControlsEnabled(
62 base::android::AttachCurrentThread(), 70 base::android::AttachCurrentThread(),
63 base::android::GetApplicationContext()); 71 base::android::GetApplicationContext());
64 } 72 }
65 73
66 } // namespace android 74 } // namespace android
67 } // namespace chrome 75 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromiumApplication.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698