| 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/aw_content_browser_client.h" | 7 #include "android_webview/browser/aw_content_browser_client.h" |
| 8 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 8 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
| 9 #include "android_webview/common/aw_content_client.h" | 9 #include "android_webview/common/aw_content_client.h" |
| 10 #include "android_webview/native/aw_contents.h" | 10 #include "android_webview/native/aw_contents.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 web_prefs->allow_running_insecure_content = | 433 web_prefs->allow_running_insecure_content = |
| 434 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); | 434 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
| 435 | 435 |
| 436 web_prefs->fullscreen_supported = | 436 web_prefs->fullscreen_supported = |
| 437 Java_AwSettings_getFullscreenSupportedLocked(env, obj); | 437 Java_AwSettings_getFullscreenSupportedLocked(env, obj); |
| 438 web_prefs->record_whole_document = | 438 web_prefs->record_whole_document = |
| 439 Java_AwSettings_getRecordFullDocument(env, obj); | 439 Java_AwSettings_getRecordFullDocument(env, obj); |
| 440 | 440 |
| 441 // TODO(jww): This should be removed once sufficient warning has been given of | 441 // TODO(jww): This should be removed once sufficient warning has been given of |
| 442 // possible API breakage because of disabling insecure use of geolocation. | 442 // possible API breakage because of disabling insecure use of geolocation. |
| 443 web_prefs->allow_geolocation_on_insecure_origins = true; | 443 web_prefs->allow_geolocation_on_insecure_origins = |
| 444 Java_AwSettings_getAllowGeolocationOnInsecureOrigins(env, obj); |
| 444 } | 445 } |
| 445 | 446 |
| 446 static jlong Init(JNIEnv* env, | 447 static jlong Init(JNIEnv* env, |
| 447 const JavaParamRef<jobject>& obj, | 448 const JavaParamRef<jobject>& obj, |
| 448 const JavaParamRef<jobject>& web_contents) { | 449 const JavaParamRef<jobject>& web_contents) { |
| 449 content::WebContents* contents = content::WebContents::FromJavaWebContents( | 450 content::WebContents* contents = content::WebContents::FromJavaWebContents( |
| 450 web_contents); | 451 web_contents); |
| 451 AwSettings* settings = new AwSettings(env, obj, contents); | 452 AwSettings* settings = new AwSettings(env, obj, contents); |
| 452 return reinterpret_cast<intptr_t>(settings); | 453 return reinterpret_cast<intptr_t>(settings); |
| 453 } | 454 } |
| 454 | 455 |
| 455 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( | 456 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( |
| 456 JNIEnv* env, | 457 JNIEnv* env, |
| 457 const JavaParamRef<jclass>& clazz) { | 458 const JavaParamRef<jclass>& clazz) { |
| 458 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); | 459 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); |
| 459 } | 460 } |
| 460 | 461 |
| 461 bool RegisterAwSettings(JNIEnv* env) { | 462 bool RegisterAwSettings(JNIEnv* env) { |
| 462 return RegisterNativesImpl(env); | 463 return RegisterNativesImpl(env); |
| 463 } | 464 } |
| 464 | 465 |
| 465 } // namespace android_webview | 466 } // namespace android_webview |
| OLD | NEW |