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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 web_prefs->experimental_webgl_enabled = | 395 web_prefs->experimental_webgl_enabled = |
396 web_prefs->experimental_webgl_enabled && | 396 web_prefs->experimental_webgl_enabled && |
397 enable_supported_hardware_accelerated_features; | 397 enable_supported_hardware_accelerated_features; |
398 | 398 |
399 web_prefs->allow_displaying_insecure_content = | 399 web_prefs->allow_displaying_insecure_content = |
400 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); | 400 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); |
401 web_prefs->allow_running_insecure_content = | 401 web_prefs->allow_running_insecure_content = |
402 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); | 402 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
403 | 403 |
404 web_prefs->disallow_fullscreen_for_non_media_elements = true; | |
405 web_prefs->fullscreen_supported = | 404 web_prefs->fullscreen_supported = |
406 Java_AwSettings_getFullscreenSupportedLocked(env, obj); | 405 Java_AwSettings_getFullscreenSupportedLocked(env, obj); |
407 } | 406 } |
408 | 407 |
409 static jlong Init(JNIEnv* env, | 408 static jlong Init(JNIEnv* env, |
410 jobject obj, | 409 jobject obj, |
411 jlong web_contents) { | 410 jlong web_contents) { |
412 AwSettings* settings = new AwSettings(env, obj, web_contents); | 411 AwSettings* settings = new AwSettings(env, obj, web_contents); |
413 return reinterpret_cast<intptr_t>(settings); | 412 return reinterpret_cast<intptr_t>(settings); |
414 } | 413 } |
415 | 414 |
416 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { | 415 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { |
417 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); | 416 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); |
418 } | 417 } |
419 | 418 |
420 bool RegisterAwSettings(JNIEnv* env) { | 419 bool RegisterAwSettings(JNIEnv* env) { |
421 return RegisterNativesImpl(env); | 420 return RegisterNativesImpl(env); |
422 } | 421 } |
423 | 422 |
424 } // namespace android_webview | 423 } // namespace android_webview |
OLD | NEW |