| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/public/renderer/web_preferences.h" | 5 #include "content/public/renderer/web_preferences.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "third_party/WebKit/public/platform/WebString.h" | 8 #include "third_party/WebKit/public/platform/WebString.h" |
| 9 #include "third_party/WebKit/public/platform/WebURL.h" | 9 #include "third_party/WebKit/public/platform/WebURL.h" |
| 10 #include "third_party/WebKit/public/web/WebKit.h" | 10 #include "third_party/WebKit/public/web/WebKit.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 it != prefs.inspector_settings.end(); | 260 it != prefs.inspector_settings.end(); |
| 261 ++it) { | 261 ++it) { |
| 262 web_view->setInspectorSetting(WebString::fromUTF8(it->first), | 262 web_view->setInspectorSetting(WebString::fromUTF8(it->first), |
| 263 WebString::fromUTF8(it->second)); | 263 WebString::fromUTF8(it->second)); |
| 264 } | 264 } |
| 265 | 265 |
| 266 // Tabs to link is not part of the settings. WebCore calls | 266 // Tabs to link is not part of the settings. WebCore calls |
| 267 // ChromeClient::tabsToLinks which is part of the glue code. | 267 // ChromeClient::tabsToLinks which is part of the glue code. |
| 268 web_view->setTabsToLinks(prefs.tabs_to_links); | 268 web_view->setTabsToLinks(prefs.tabs_to_links); |
| 269 | 269 |
| 270 // TODO(scheib): crbug.com/344002 Remove FullScreenEnabled from Blink | |
| 271 settings->setFullScreenEnabled(true); | |
| 272 settings->setAllowDisplayOfInsecureContent( | 270 settings->setAllowDisplayOfInsecureContent( |
| 273 prefs.allow_displaying_insecure_content); | 271 prefs.allow_displaying_insecure_content); |
| 274 settings->setAllowRunningOfInsecureContent( | 272 settings->setAllowRunningOfInsecureContent( |
| 275 prefs.allow_running_insecure_content); | 273 prefs.allow_running_insecure_content); |
| 276 settings->setPasswordEchoEnabled(prefs.password_echo_enabled); | 274 settings->setPasswordEchoEnabled(prefs.password_echo_enabled); |
| 277 settings->setShouldPrintBackgrounds(prefs.should_print_backgrounds); | 275 settings->setShouldPrintBackgrounds(prefs.should_print_backgrounds); |
| 278 settings->setShouldClearDocumentBackground( | 276 settings->setShouldClearDocumentBackground( |
| 279 prefs.should_clear_document_background); | 277 prefs.should_clear_document_background); |
| 280 settings->setEnableScrollAnimator(prefs.enable_scroll_animator); | 278 settings->setEnableScrollAnimator(prefs.enable_scroll_animator); |
| 281 settings->setVisualWordMovementEnabled(prefs.visual_word_movement_enabled); | 279 settings->setVisualWordMovementEnabled(prefs.visual_word_movement_enabled); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 settings->setPinchVirtualViewportEnabled( | 357 settings->setPinchVirtualViewportEnabled( |
| 360 prefs.pinch_virtual_viewport_enabled); | 358 prefs.pinch_virtual_viewport_enabled); |
| 361 | 359 |
| 362 settings->setPinchOverlayScrollbarThickness( | 360 settings->setPinchOverlayScrollbarThickness( |
| 363 prefs.pinch_overlay_scrollbar_thickness); | 361 prefs.pinch_overlay_scrollbar_thickness); |
| 364 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); | 362 settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); |
| 365 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); | 363 settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); |
| 366 } | 364 } |
| 367 | 365 |
| 368 } // namespace content | 366 } // namespace content |
| OLD | NEW |