| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 bool video_overlay = | 214 bool video_overlay = |
| 215 Java_AwSettings_getVideoOverlayForEmbeddedVideoEnabledLocked(env, obj); | 215 Java_AwSettings_getVideoOverlayForEmbeddedVideoEnabledLocked(env, obj); |
| 216 bool force_video_overlay = | 216 bool force_video_overlay = |
| 217 Java_AwSettings_getForceVideoOverlayForTests(env, obj); | 217 Java_AwSettings_getForceVideoOverlayForTests(env, obj); |
| 218 if (video_overlay != | 218 if (video_overlay != |
| 219 prefs->use_video_overlay_for_embedded_encrypted_video || | 219 prefs->use_video_overlay_for_embedded_encrypted_video || |
| 220 force_video_overlay != prefs->use_view_overlay_for_all_video) { | 220 force_video_overlay != prefs->use_view_overlay_for_all_video) { |
| 221 prefs->use_video_overlay_for_embedded_encrypted_video = video_overlay; | 221 prefs->use_video_overlay_for_embedded_encrypted_video = video_overlay; |
| 222 prefs->use_view_overlay_for_all_video = force_video_overlay; | 222 prefs->use_view_overlay_for_all_video = force_video_overlay; |
| 223 prefs->hw_secure_codec_allowed = video_overlay; |
| 223 update_prefs = true; | 224 update_prefs = true; |
| 224 } | 225 } |
| 225 | 226 |
| 226 if (prefs->accept_languages.compare( | 227 if (prefs->accept_languages.compare( |
| 227 AwContentBrowserClient::GetAcceptLangsImpl())) { | 228 AwContentBrowserClient::GetAcceptLangsImpl())) { |
| 228 prefs->accept_languages = AwContentBrowserClient::GetAcceptLangsImpl(); | 229 prefs->accept_languages = AwContentBrowserClient::GetAcceptLangsImpl(); |
| 229 update_prefs = true; | 230 update_prefs = true; |
| 230 } | 231 } |
| 231 | 232 |
| 232 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 233 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 JNIEnv* env, | 458 JNIEnv* env, |
| 458 const JavaParamRef<jclass>& clazz) { | 459 const JavaParamRef<jclass>& clazz) { |
| 459 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); | 460 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); |
| 460 } | 461 } |
| 461 | 462 |
| 462 bool RegisterAwSettings(JNIEnv* env) { | 463 bool RegisterAwSettings(JNIEnv* env) { |
| 463 return RegisterNativesImpl(env); | 464 return RegisterNativesImpl(env); |
| 464 } | 465 } |
| 465 | 466 |
| 466 } // namespace android_webview | 467 } // namespace android_webview |
| OLD | NEW |