| 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/supports_user_data.h" | 11 #include "base/supports_user_data.h" |
| 12 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
| 13 #include "content/public/browser/navigation_entry.h" | 13 #include "content/public/browser/navigation_entry.h" |
| 14 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
| 15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/common/content_client.h" | 16 #include "content/public/common/content_client.h" |
| 17 #include "jni/AwSettings_jni.h" | 17 #include "jni/AwSettings_jni.h" |
| 18 #include "webkit/common/user_agent/user_agent.h" | 18 #include "webkit/common/user_agent/user_agent.h" |
| 19 #include "webkit/common/webpreferences.h" | 19 #include "webkit/common/webpreferences.h" |
| 20 #include "webkit/glue/webkit_glue.h" | |
| 21 | 20 |
| 22 using base::android::ConvertJavaStringToUTF16; | 21 using base::android::ConvertJavaStringToUTF16; |
| 23 using base::android::ConvertUTF8ToJavaString; | 22 using base::android::ConvertUTF8ToJavaString; |
| 24 using base::android::ScopedJavaLocalRef; | 23 using base::android::ScopedJavaLocalRef; |
| 25 | 24 |
| 26 namespace android_webview { | 25 namespace android_webview { |
| 27 | 26 |
| 28 const void* kAwSettingsUserDataKey = &kAwSettingsUserDataKey; | 27 const void* kAwSettingsUserDataKey = &kAwSettingsUserDataKey; |
| 29 | 28 |
| 30 class AwSettingsUserData : public base::SupportsUserData::Data { | 29 class AwSettingsUserData : public base::SupportsUserData::Data { |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { | 320 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { |
| 322 return base::android::ConvertUTF8ToJavaString( | 321 return base::android::ConvertUTF8ToJavaString( |
| 323 env, content::GetUserAgent(GURL())).Release(); | 322 env, content::GetUserAgent(GURL())).Release(); |
| 324 } | 323 } |
| 325 | 324 |
| 326 bool RegisterAwSettings(JNIEnv* env) { | 325 bool RegisterAwSettings(JNIEnv* env) { |
| 327 return RegisterNativesImpl(env) >= 0; | 326 return RegisterNativesImpl(env) >= 0; |
| 328 } | 327 } |
| 329 | 328 |
| 330 } // namespace android_webview | 329 } // namespace android_webview |
| OLD | NEW |