| 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/common/aw_content_client.h" | 8 #include "android_webview/common/aw_content_client.h" |
| 9 #include "android_webview/native/aw_contents.h" | 9 #include "android_webview/native/aw_contents.h" |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // slightly to turn canvas off without changing | 421 // slightly to turn canvas off without changing |
| 422 // accelerated_2d_canvas_enabled, which also affects compositing mode. | 422 // accelerated_2d_canvas_enabled, which also affects compositing mode. |
| 423 // Using 100M instead of max int to avoid overflows. | 423 // Using 100M instead of max int to avoid overflows. |
| 424 web_prefs->minimum_accelerated_2d_canvas_size = 100 * 1000 * 1000; | 424 web_prefs->minimum_accelerated_2d_canvas_size = 100 * 1000 * 1000; |
| 425 } | 425 } |
| 426 | 426 |
| 427 web_prefs->allow_displaying_insecure_content = | 427 web_prefs->allow_displaying_insecure_content = |
| 428 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); | 428 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); |
| 429 web_prefs->allow_running_insecure_content = | 429 web_prefs->allow_running_insecure_content = |
| 430 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); | 430 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
| 431 |
| 432 web_prefs->disallow_fullscreen_for_non_media_elements = true; |
| 431 } | 433 } |
| 432 | 434 |
| 433 static jlong Init(JNIEnv* env, | 435 static jlong Init(JNIEnv* env, |
| 434 jobject obj, | 436 jobject obj, |
| 435 jlong web_contents) { | 437 jlong web_contents) { |
| 436 AwSettings* settings = new AwSettings(env, obj, web_contents); | 438 AwSettings* settings = new AwSettings(env, obj, web_contents); |
| 437 return reinterpret_cast<intptr_t>(settings); | 439 return reinterpret_cast<intptr_t>(settings); |
| 438 } | 440 } |
| 439 | 441 |
| 440 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { | 442 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { |
| 441 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); | 443 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); |
| 442 } | 444 } |
| 443 | 445 |
| 444 bool RegisterAwSettings(JNIEnv* env) { | 446 bool RegisterAwSettings(JNIEnv* env) { |
| 445 return RegisterNativesImpl(env); | 447 return RegisterNativesImpl(env); |
| 446 } | 448 } |
| 447 | 449 |
| 448 } // namespace android_webview | 450 } // namespace android_webview |
| OLD | NEW |