| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 // Any canvas smaller than this will fallback to software. Abusing this | 422 // Any canvas smaller than this will fallback to software. Abusing this |
| 423 // slightly to turn canvas off without changing | 423 // slightly to turn canvas off without changing |
| 424 // accelerated_2d_canvas_enabled, which also affects compositing mode. | 424 // accelerated_2d_canvas_enabled, which also affects compositing mode. |
| 425 // Using 100M instead of max int to avoid overflows. | 425 // Using 100M instead of max int to avoid overflows. |
| 426 web_prefs->minimum_accelerated_2d_canvas_size = 100 * 1000 * 1000; | 426 web_prefs->minimum_accelerated_2d_canvas_size = 100 * 1000 * 1000; |
| 427 } | 427 } |
| 428 web_prefs->experimental_webgl_enabled = | 428 web_prefs->experimental_webgl_enabled = |
| 429 web_prefs->experimental_webgl_enabled && | 429 web_prefs->experimental_webgl_enabled && |
| 430 enable_supported_hardware_accelerated_features; | 430 enable_supported_hardware_accelerated_features; |
| 431 | 431 |
| 432 web_prefs->allow_displaying_insecure_content = | 432 // If strict mixed content checking is enabled then running should not be |
| 433 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); | 433 // allowed. |
| 434 DCHECK(!Java_AwSettings_getUseStricMixedContentCheckingLocked(env, obj) || |
| 435 !Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj)); |
| 434 web_prefs->allow_running_insecure_content = | 436 web_prefs->allow_running_insecure_content = |
| 435 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); | 437 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
| 438 web_prefs->strict_mixed_content_checking = |
| 439 Java_AwSettings_getUseStricMixedContentCheckingLocked(env, obj); |
| 436 | 440 |
| 437 web_prefs->fullscreen_supported = | 441 web_prefs->fullscreen_supported = |
| 438 Java_AwSettings_getFullscreenSupportedLocked(env, obj); | 442 Java_AwSettings_getFullscreenSupportedLocked(env, obj); |
| 439 web_prefs->record_whole_document = | 443 web_prefs->record_whole_document = |
| 440 Java_AwSettings_getRecordFullDocument(env, obj); | 444 Java_AwSettings_getRecordFullDocument(env, obj); |
| 441 | 445 |
| 442 // TODO(jww): This should be removed once sufficient warning has been given of | 446 // TODO(jww): This should be removed once sufficient warning has been given of |
| 443 // possible API breakage because of disabling insecure use of geolocation. | 447 // possible API breakage because of disabling insecure use of geolocation. |
| 444 web_prefs->allow_geolocation_on_insecure_origins = | 448 web_prefs->allow_geolocation_on_insecure_origins = |
| 445 Java_AwSettings_getAllowGeolocationOnInsecureOrigins(env, obj); | 449 Java_AwSettings_getAllowGeolocationOnInsecureOrigins(env, obj); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 458 JNIEnv* env, | 462 JNIEnv* env, |
| 459 const JavaParamRef<jclass>& clazz) { | 463 const JavaParamRef<jclass>& clazz) { |
| 460 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); | 464 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); |
| 461 } | 465 } |
| 462 | 466 |
| 463 bool RegisterAwSettings(JNIEnv* env) { | 467 bool RegisterAwSettings(JNIEnv* env) { |
| 464 return RegisterNativesImpl(env); | 468 return RegisterNativesImpl(env); |
| 465 } | 469 } |
| 466 | 470 |
| 467 } // namespace android_webview | 471 } // namespace android_webview |
| OLD | NEW |