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

Side by Side Diff: components/html_viewer/blink_settings.cc

Issue 1415513002: Remove plumbing for inert-visual-viewport flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix layout test + trybot compile error Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/html_viewer/blink_settings.h" 5 #include "components/html_viewer/blink_settings.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool viewport_meta_enabled; 180 bool viewport_meta_enabled;
181 bool main_frame_resizes_are_orientation_changes; 181 bool main_frame_resizes_are_orientation_changes;
182 bool initialize_at_minimum_page_scale; 182 bool initialize_at_minimum_page_scale;
183 bool smart_insert_delete_enabled; 183 bool smart_insert_delete_enabled;
184 bool spatial_navigation_enabled; 184 bool spatial_navigation_enabled;
185 int pinch_overlay_scrollbar_thickness; 185 int pinch_overlay_scrollbar_thickness;
186 bool use_solid_color_scrollbars; 186 bool use_solid_color_scrollbars;
187 bool navigate_on_drag_drop; 187 bool navigate_on_drag_drop;
188 V8CacheOptions v8_cache_options; 188 V8CacheOptions v8_cache_options;
189 bool slimming_paint_v2_enabled; 189 bool slimming_paint_v2_enabled;
190 bool inert_visual_viewport;
191 190
192 // This flags corresponds to a Page's Settings' setCookieEnabled state. It 191 // This flags corresponds to a Page's Settings' setCookieEnabled state. It
193 // only controls whether or not the "document.cookie" field is properly 192 // only controls whether or not the "document.cookie" field is properly
194 // connected to the backing store, for instance if you wanted to be able to 193 // connected to the backing store, for instance if you wanted to be able to
195 // define custom getters and setters from within a unique security content 194 // define custom getters and setters from within a unique security content
196 // without raising a DOM security exception. 195 // without raising a DOM security exception.
197 bool cookie_enabled; 196 bool cookie_enabled;
198 197
199 // This flag indicates whether H/W accelerated video decode is enabled for 198 // This flag indicates whether H/W accelerated video decode is enabled for
200 // pepper plugins. Defaults to false. 199 // pepper plugins. Defaults to false.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 smart_insert_delete_enabled(true), 376 smart_insert_delete_enabled(true),
378 #else 377 #else
379 smart_insert_delete_enabled(false), 378 smart_insert_delete_enabled(false),
380 #endif 379 #endif
381 spatial_navigation_enabled(false), 380 spatial_navigation_enabled(false),
382 pinch_overlay_scrollbar_thickness(0), 381 pinch_overlay_scrollbar_thickness(0),
383 use_solid_color_scrollbars(false), 382 use_solid_color_scrollbars(false),
384 navigate_on_drag_drop(true), 383 navigate_on_drag_drop(true),
385 v8_cache_options(V8_CACHE_OPTIONS_DEFAULT), 384 v8_cache_options(V8_CACHE_OPTIONS_DEFAULT),
386 slimming_paint_v2_enabled(false), 385 slimming_paint_v2_enabled(false),
387 inert_visual_viewport(false),
388 cookie_enabled(true), 386 cookie_enabled(true),
389 pepper_accelerated_video_decode_enabled(false), 387 pepper_accelerated_video_decode_enabled(false),
390 animation_policy(IMAGE_ANIMATION_POLICY_ALLOWED), 388 animation_policy(IMAGE_ANIMATION_POLICY_ALLOWED),
391 #if defined(OS_ANDROID) 389 #if defined(OS_ANDROID)
392 text_autosizing_enabled(true), 390 text_autosizing_enabled(true),
393 font_scale_factor(1.0f), 391 font_scale_factor(1.0f),
394 device_scale_adjustment(1.0f), 392 device_scale_adjustment(1.0f),
395 force_enable_zoom(false), 393 force_enable_zoom(false),
396 fullscreen_supported(true), 394 fullscreen_supported(true),
397 double_tap_to_zoom_enabled(true), 395 double_tap_to_zoom_enabled(true),
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 prefs.image_color_profiles_enabled); 720 prefs.image_color_profiles_enabled);
723 settings->setShouldRespectImageOrientation( 721 settings->setShouldRespectImageOrientation(
724 prefs.should_respect_image_orientation); 722 prefs.should_respect_image_orientation);
725 723
726 settings->setUnsafePluginPastingEnabled(false); 724 settings->setUnsafePluginPastingEnabled(false);
727 settings->setEditingBehavior( 725 settings->setEditingBehavior(
728 static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior)); 726 static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior));
729 727
730 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); 728 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows);
731 729
732 settings->setInertVisualViewport(prefs.inert_visual_viewport);
733
734 // TODO(bokan): Remove once Blink side is gone. 730 // TODO(bokan): Remove once Blink side is gone.
735 settings->setInvertViewportScrollOrder(true); 731 settings->setInvertViewportScrollOrder(true);
736 732
737 settings->setViewportEnabled(prefs.viewport_enabled); 733 settings->setViewportEnabled(prefs.viewport_enabled);
738 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); 734 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale);
739 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); 735 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled);
740 settings->setMainFrameResizesAreOrientationChanges( 736 settings->setMainFrameResizesAreOrientationChanges(
741 prefs.main_frame_resizes_are_orientation_changes); 737 prefs.main_frame_resizes_are_orientation_changes);
742 738
743 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); 739 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 857
862 void BlinkSettings::ApplySettingsToWebView(blink::WebView* view) const { 858 void BlinkSettings::ApplySettingsToWebView(blink::WebView* view) const {
863 if (layout_test_settings_) 859 if (layout_test_settings_)
864 ApplySettings(view, true /* test_mode */); 860 ApplySettings(view, true /* test_mode */);
865 else 861 else
866 ApplySettings(view, false /* test_mode */); 862 ApplySettings(view, false /* test_mode */);
867 ApplyFontRendereringSettings(); 863 ApplyFontRendereringSettings();
868 } 864 }
869 865
870 } // namespace html_viewer 866 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698