Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Side by Side Diff: android_webview/native/aw_settings.cc

Issue 2620743003: Revert "Use hide_scrollbars setting for Android WebView." (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 438
439 // We use system scrollbars, so make Blink's scrollbars invisible.
440 web_prefs->hide_scrollbars = true;
441
442 // Keep spellcheck disabled on html elements unless the spellcheck="true" 439 // Keep spellcheck disabled on html elements unless the spellcheck="true"
443 // attribute is explicitly specified. This "opt-in" behavior is for backward 440 // attribute is explicitly specified. This "opt-in" behavior is for backward
444 // consistency in apps that use WebView (see crbug.com/652314). 441 // consistency in apps that use WebView (see crbug.com/652314).
445 web_prefs->spellcheck_enabled_by_default = false; 442 web_prefs->spellcheck_enabled_by_default = false;
446 } 443 }
447 444
448 static jlong Init(JNIEnv* env, 445 static jlong Init(JNIEnv* env,
449 const JavaParamRef<jobject>& obj, 446 const JavaParamRef<jobject>& obj,
450 const JavaParamRef<jobject>& web_contents) { 447 const JavaParamRef<jobject>& web_contents) {
451 content::WebContents* contents = content::WebContents::FromJavaWebContents( 448 content::WebContents* contents = content::WebContents::FromJavaWebContents(
452 web_contents); 449 web_contents);
453 AwSettings* settings = new AwSettings(env, obj, contents); 450 AwSettings* settings = new AwSettings(env, obj, contents);
454 return reinterpret_cast<intptr_t>(settings); 451 return reinterpret_cast<intptr_t>(settings);
455 } 452 }
456 453
457 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( 454 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent(
458 JNIEnv* env, 455 JNIEnv* env,
459 const JavaParamRef<jclass>& clazz) { 456 const JavaParamRef<jclass>& clazz) {
460 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); 457 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent());
461 } 458 }
462 459
463 bool RegisterAwSettings(JNIEnv* env) { 460 bool RegisterAwSettings(JNIEnv* env) {
464 return RegisterNativesImpl(env); 461 return RegisterNativesImpl(env);
465 } 462 }
466 463
467 } // namespace android_webview 464 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698