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

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 12217134: [Android WebView] Implement WebSettings.{get|set}LoadWithOverviewMode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/webpreferences.h" 5 #include "webkit/glue/webpreferences.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 editing_behavior(EDITING_BEHAVIOR_WIN), 135 editing_behavior(EDITING_BEHAVIOR_WIN),
136 #elif defined(OS_ANDROID) 136 #elif defined(OS_ANDROID)
137 editing_behavior(EDITING_BEHAVIOR_ANDROID), 137 editing_behavior(EDITING_BEHAVIOR_ANDROID),
138 #elif defined(OS_POSIX) 138 #elif defined(OS_POSIX)
139 editing_behavior(EDITING_BEHAVIOR_UNIX), 139 editing_behavior(EDITING_BEHAVIOR_UNIX),
140 #else 140 #else
141 editing_behavior(EDITING_BEHAVIOR_MAC), 141 editing_behavior(EDITING_BEHAVIOR_MAC),
142 #endif 142 #endif
143 supports_multiple_windows(true), 143 supports_multiple_windows(true),
144 viewport_enabled(false), 144 viewport_enabled(false),
145 viewport_scale_content_to_fit(true),
145 record_rendering_stats(false), 146 record_rendering_stats(false),
146 cookie_enabled(true) 147 cookie_enabled(true)
147 #if defined(OS_ANDROID) 148 #if defined(OS_ANDROID)
148 , 149 ,
149 text_autosizing_enabled(true), 150 text_autosizing_enabled(true),
150 font_scale_factor(1.0f), 151 font_scale_factor(1.0f),
151 force_enable_zoom(false), 152 force_enable_zoom(false),
152 user_gesture_required_for_media_playback(true) 153 user_gesture_required_for_media_playback(true)
153 #endif 154 #endif
154 { 155 {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 settings->setDeferredImageDecodingEnabled(deferred_image_decoding_enabled); 477 settings->setDeferredImageDecodingEnabled(deferred_image_decoding_enabled);
477 settings->setShouldRespectImageOrientation(should_respect_image_orientation); 478 settings->setShouldRespectImageOrientation(should_respect_image_orientation);
478 479
479 settings->setUnsafePluginPastingEnabled(false); 480 settings->setUnsafePluginPastingEnabled(false);
480 settings->setEditingBehavior( 481 settings->setEditingBehavior(
481 static_cast<WebSettings::EditingBehavior>(editing_behavior)); 482 static_cast<WebSettings::EditingBehavior>(editing_behavior));
482 483
483 settings->setSupportsMultipleWindows(supports_multiple_windows); 484 settings->setSupportsMultipleWindows(supports_multiple_windows);
484 485
485 settings->setViewportEnabled(viewport_enabled); 486 settings->setViewportEnabled(viewport_enabled);
487 if (settings->viewportScaleContentToFit() != viewport_scale_content_to_fit) {
488 settings->setViewportScaleContentToFit(viewport_scale_content_to_fit);
489 web_view->resetScrollAndScaleState();
490 }
486 491
487 #if defined(OS_ANDROID) 492 #if defined(OS_ANDROID)
488 settings->setAllowCustomScrollbarInMainFrame(false); 493 settings->setAllowCustomScrollbarInMainFrame(false);
489 settings->setTextAutosizingEnabled(text_autosizing_enabled); 494 settings->setTextAutosizingEnabled(text_autosizing_enabled);
490 settings->setTextAutosizingFontScaleFactor(font_scale_factor); 495 settings->setTextAutosizingFontScaleFactor(font_scale_factor);
491 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom); 496 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom);
492 settings->setAutoZoomFocusedNodeToLegibleScale(true); 497 settings->setAutoZoomFocusedNodeToLegibleScale(true);
493 settings->setDoubleTapToZoomEnabled(true); 498 settings->setDoubleTapToZoomEnabled(true);
494 settings->setMediaPlaybackRequiresUserGesture( 499 settings->setMediaPlaybackRequiresUserGesture(
495 user_gesture_required_for_media_playback); 500 user_gesture_required_for_media_playback);
(...skipping 11 matching lines...) Expand all
507 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac); 512 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac);
508 COMPILE_ASSERT_MATCHING_ENUMS( 513 COMPILE_ASSERT_MATCHING_ENUMS(
509 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin); 514 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin);
510 COMPILE_ASSERT_MATCHING_ENUMS( 515 COMPILE_ASSERT_MATCHING_ENUMS(
511 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix); 516 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix);
512 COMPILE_ASSERT_MATCHING_ENUMS( 517 COMPILE_ASSERT_MATCHING_ENUMS(
513 WebPreferences::EDITING_BEHAVIOR_ANDROID, 518 WebPreferences::EDITING_BEHAVIOR_ANDROID,
514 WebSettings::EditingBehaviorAndroid); 519 WebSettings::EditingBehaviorAndroid);
515 520
516 } // namespace webkit_glue 521 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698