| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |