| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/html_viewer/web_preferences.h" | 8 #include "components/html_viewer/web_preferences.h" |
| 9 #include "third_party/WebKit/public/platform/WebString.h" | 9 #include "third_party/WebKit/public/platform/WebString.h" |
| 10 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 10 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 prefs.image_color_profiles_enabled); | 289 prefs.image_color_profiles_enabled); |
| 290 settings->setShouldRespectImageOrientation( | 290 settings->setShouldRespectImageOrientation( |
| 291 prefs.should_respect_image_orientation); | 291 prefs.should_respect_image_orientation); |
| 292 | 292 |
| 293 settings->setUnsafePluginPastingEnabled(false); | 293 settings->setUnsafePluginPastingEnabled(false); |
| 294 settings->setEditingBehavior( | 294 settings->setEditingBehavior( |
| 295 static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior)); | 295 static_cast<blink::WebSettings::EditingBehavior>(prefs.editing_behavior)); |
| 296 | 296 |
| 297 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); | 297 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); |
| 298 | 298 |
| 299 // TODO(bokan): Remove once Blink side is gone. |
| 300 settings->setInvertViewportScrollOrder(true); |
| 301 |
| 299 settings->setViewportEnabled(prefs.viewport_enabled); | 302 settings->setViewportEnabled(prefs.viewport_enabled); |
| 300 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); | 303 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); |
| 301 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); | 304 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); |
| 302 settings->setMainFrameResizesAreOrientationChanges( | 305 settings->setMainFrameResizesAreOrientationChanges( |
| 303 prefs.main_frame_resizes_are_orientation_changes); | 306 prefs.main_frame_resizes_are_orientation_changes); |
| 304 | 307 |
| 305 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); | 308 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); |
| 306 | 309 |
| 307 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); | 310 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); |
| 308 | 311 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 experimental_webgl_enabled_ = !command_line->HasSwitch(kDisableWebGLSwitch); | 415 experimental_webgl_enabled_ = !command_line->HasSwitch(kDisableWebGLSwitch); |
| 413 } | 416 } |
| 414 | 417 |
| 415 void BlinkSettingsImpl::ApplySettingsToWebView(blink::WebView* view) const { | 418 void BlinkSettingsImpl::ApplySettingsToWebView(blink::WebView* view) const { |
| 416 WebPreferences prefs; | 419 WebPreferences prefs; |
| 417 ApplySettings(view, prefs); | 420 ApplySettings(view, prefs); |
| 418 ApplyFontRendereringSettings(); | 421 ApplyFontRendereringSettings(); |
| 419 } | 422 } |
| 420 | 423 |
| 421 } // namespace html_viewer | 424 } // namespace html_viewer |
| OLD | NEW |