| OLD | NEW | 
|    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_impl.h" |    5 #include "components/html_viewer/blink_settings_impl.h" | 
|    6  |    6  | 
|    7 #include <stdint.h> |    7 #include <stdint.h> | 
|    8  |    8  | 
|    9 #include "base/command_line.h" |    9 #include "base/command_line.h" | 
|   10 #include "build/build_config.h" |   10 #include "build/build_config.h" | 
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  295       prefs.image_color_profiles_enabled); |  295       prefs.image_color_profiles_enabled); | 
|  296   settings->setShouldRespectImageOrientation( |  296   settings->setShouldRespectImageOrientation( | 
|  297       prefs.should_respect_image_orientation); |  297       prefs.should_respect_image_orientation); | 
|  298  |  298  | 
|  299   settings->setUnsafePluginPastingEnabled(false); |  299   settings->setUnsafePluginPastingEnabled(false); | 
|  300   settings->setEditingBehavior( |  300   settings->setEditingBehavior( | 
|  301       static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior)); |  301       static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior)); | 
|  302  |  302  | 
|  303   settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); |  303   settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); | 
|  304  |  304  | 
|  305   // TODO(bokan): Remove once Blink side is gone. |  | 
|  306   settings->setInvertViewportScrollOrder(true); |  | 
|  307  |  | 
|  308   settings->setViewportEnabled(prefs.viewport_enabled); |  305   settings->setViewportEnabled(prefs.viewport_enabled); | 
|  309   settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); |  306   settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); | 
|  310   settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); |  307   settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); | 
|  311   settings->setMainFrameResizesAreOrientationChanges( |  308   settings->setMainFrameResizesAreOrientationChanges( | 
|  312       prefs.main_frame_resizes_are_orientation_changes); |  309       prefs.main_frame_resizes_are_orientation_changes); | 
|  313  |  310  | 
|  314   settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); |  311   settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); | 
|  315  |  312  | 
|  316   settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); |  313   settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); | 
|  317  |  314  | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  421   experimental_webgl_enabled_ = !command_line->HasSwitch(kDisableWebGLSwitch); |  418   experimental_webgl_enabled_ = !command_line->HasSwitch(kDisableWebGLSwitch); | 
|  422 } |  419 } | 
|  423  |  420  | 
|  424 void BlinkSettingsImpl::ApplySettingsToWebView(blink::WebView* view) const { |  421 void BlinkSettingsImpl::ApplySettingsToWebView(blink::WebView* view) const { | 
|  425   WebPreferences prefs; |  422   WebPreferences prefs; | 
|  426   ApplySettings(view, prefs); |  423   ApplySettings(view, prefs); | 
|  427   ApplyFontRendereringSettings(); |  424   ApplyFontRendereringSettings(); | 
|  428 } |  425 } | 
|  429  |  426  | 
|  430 }  // namespace html_viewer |  427 }  // namespace html_viewer | 
| OLD | NEW |