OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "android_webview/native/aw_settings.h" | 5 #include "android_webview/native/aw_settings.h" |
6 | 6 |
7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
8 #include "android_webview/native/aw_contents.h" | 8 #include "android_webview/native/aw_contents.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
13 #include "content/public/browser/navigation_controller.h" | 13 #include "content/public/browser/navigation_controller.h" |
14 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
| 19 #include "content/public/common/user_agent.h" |
19 #include "jni/AwSettings_jni.h" | 20 #include "jni/AwSettings_jni.h" |
20 #include "webkit/common/user_agent/user_agent.h" | |
21 #include "webkit/common/webpreferences.h" | 21 #include "webkit/common/webpreferences.h" |
22 | 22 |
23 using base::android::ConvertJavaStringToUTF16; | 23 using base::android::ConvertJavaStringToUTF16; |
24 using base::android::ConvertUTF8ToJavaString; | 24 using base::android::ConvertUTF8ToJavaString; |
25 using base::android::ScopedJavaLocalRef; | 25 using base::android::ScopedJavaLocalRef; |
26 | 26 |
27 namespace android_webview { | 27 namespace android_webview { |
28 | 28 |
29 const void* kAwSettingsUserDataKey = &kAwSettingsUserDataKey; | 29 const void* kAwSettingsUserDataKey = &kAwSettingsUserDataKey; |
30 | 30 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { | 343 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { |
344 return base::android::ConvertUTF8ToJavaString( | 344 return base::android::ConvertUTF8ToJavaString( |
345 env, content::GetUserAgent(GURL())).Release(); | 345 env, content::GetUserAgent(GURL())).Release(); |
346 } | 346 } |
347 | 347 |
348 bool RegisterAwSettings(JNIEnv* env) { | 348 bool RegisterAwSettings(JNIEnv* env) { |
349 return RegisterNativesImpl(env) >= 0; | 349 return RegisterNativesImpl(env) >= 0; |
350 } | 350 } |
351 | 351 |
352 } // namespace android_webview | 352 } // namespace android_webview |
OLD | NEW |