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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 web_prefs->fullscreen_supported = | 429 web_prefs->fullscreen_supported = |
430 Java_AwSettings_getFullscreenSupportedLocked(env, obj); | 430 Java_AwSettings_getFullscreenSupportedLocked(env, obj); |
431 web_prefs->record_whole_document = | 431 web_prefs->record_whole_document = |
432 Java_AwSettings_getRecordFullDocument(env, obj); | 432 Java_AwSettings_getRecordFullDocument(env, obj); |
433 | 433 |
434 // TODO(jww): This should be removed once sufficient warning has been given of | 434 // TODO(jww): This should be removed once sufficient warning has been given of |
435 // possible API breakage because of disabling insecure use of geolocation. | 435 // possible API breakage because of disabling insecure use of geolocation. |
436 web_prefs->allow_geolocation_on_insecure_origins = | 436 web_prefs->allow_geolocation_on_insecure_origins = |
437 Java_AwSettings_getAllowGeolocationOnInsecureOrigins(env, obj); | 437 Java_AwSettings_getAllowGeolocationOnInsecureOrigins(env, obj); |
| 438 |
| 439 // We use system scrollbars, so make Blink's scrollbars invisible. |
| 440 web_prefs->hide_scrollbars = true; |
438 } | 441 } |
439 | 442 |
440 static jlong Init(JNIEnv* env, | 443 static jlong Init(JNIEnv* env, |
441 const JavaParamRef<jobject>& obj, | 444 const JavaParamRef<jobject>& obj, |
442 const JavaParamRef<jobject>& web_contents) { | 445 const JavaParamRef<jobject>& web_contents) { |
443 content::WebContents* contents = content::WebContents::FromJavaWebContents( | 446 content::WebContents* contents = content::WebContents::FromJavaWebContents( |
444 web_contents); | 447 web_contents); |
445 AwSettings* settings = new AwSettings(env, obj, contents); | 448 AwSettings* settings = new AwSettings(env, obj, contents); |
446 return reinterpret_cast<intptr_t>(settings); | 449 return reinterpret_cast<intptr_t>(settings); |
447 } | 450 } |
448 | 451 |
449 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( | 452 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( |
450 JNIEnv* env, | 453 JNIEnv* env, |
451 const JavaParamRef<jclass>& clazz) { | 454 const JavaParamRef<jclass>& clazz) { |
452 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); | 455 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); |
453 } | 456 } |
454 | 457 |
455 bool RegisterAwSettings(JNIEnv* env) { | 458 bool RegisterAwSettings(JNIEnv* env) { |
456 return RegisterNativesImpl(env); | 459 return RegisterNativesImpl(env); |
457 } | 460 } |
458 | 461 |
459 } // namespace android_webview | 462 } // namespace android_webview |
OLD | NEW |