| OLD | NEW |
| 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/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 accelerated_2d_canvas_enabled(false), | 92 accelerated_2d_canvas_enabled(false), |
| 93 deferred_2d_canvas_enabled(false), | 93 deferred_2d_canvas_enabled(false), |
| 94 accelerated_painting_enabled(false), | 94 accelerated_painting_enabled(false), |
| 95 accelerated_filters_enabled(false), | 95 accelerated_filters_enabled(false), |
| 96 gesture_tap_highlight_enabled(false), | 96 gesture_tap_highlight_enabled(false), |
| 97 accelerated_plugins_enabled(false), | 97 accelerated_plugins_enabled(false), |
| 98 memory_info_enabled(false), | 98 memory_info_enabled(false), |
| 99 fullscreen_enabled(false), | 99 fullscreen_enabled(false), |
| 100 allow_displaying_insecure_content(true), | 100 allow_displaying_insecure_content(true), |
| 101 allow_running_insecure_content(false), | 101 allow_running_insecure_content(false), |
| 102 #if defined(OS_ANDROID) |
| 103 font_scale_factor(1.0f), |
| 104 force_enable_zoom(false), |
| 105 #endif |
| 102 password_echo_enabled(false), | 106 password_echo_enabled(false), |
| 103 should_print_backgrounds(false), | 107 should_print_backgrounds(false), |
| 104 enable_scroll_animator(false), | 108 enable_scroll_animator(false), |
| 105 visual_word_movement_enabled(false), | 109 visual_word_movement_enabled(false), |
| 106 css_sticky_position_enabled(false), | 110 css_sticky_position_enabled(false), |
| 107 css_regions_enabled(false), | 111 css_regions_enabled(false), |
| 108 css_shaders_enabled(false), | 112 css_shaders_enabled(false), |
| 109 css_variables_enabled(false), | 113 css_variables_enabled(false), |
| 110 device_supports_touch(false), | 114 device_supports_touch(false), |
| 111 device_supports_mouse(true), | 115 device_supports_mouse(true), |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 387 |
| 384 // Tabs to link is not part of the settings. WebCore calls | 388 // Tabs to link is not part of the settings. WebCore calls |
| 385 // ChromeClient::tabsToLinks which is part of the glue code. | 389 // ChromeClient::tabsToLinks which is part of the glue code. |
| 386 web_view->setTabsToLinks(tabs_to_links); | 390 web_view->setTabsToLinks(tabs_to_links); |
| 387 | 391 |
| 388 settings->setInteractiveFormValidationEnabled(true); | 392 settings->setInteractiveFormValidationEnabled(true); |
| 389 | 393 |
| 390 settings->setFullScreenEnabled(fullscreen_enabled); | 394 settings->setFullScreenEnabled(fullscreen_enabled); |
| 391 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); | 395 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); |
| 392 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); | 396 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); |
| 397 #if defined(OS_ANDROID) |
| 398 settings->setTextAutosizingFontScaleFactor(font_scale_factor); |
| 399 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom); |
| 400 #endif |
| 393 settings->setPasswordEchoEnabled(password_echo_enabled); | 401 settings->setPasswordEchoEnabled(password_echo_enabled); |
| 394 settings->setShouldPrintBackgrounds(should_print_backgrounds); | 402 settings->setShouldPrintBackgrounds(should_print_backgrounds); |
| 395 settings->setEnableScrollAnimator(enable_scroll_animator); | 403 settings->setEnableScrollAnimator(enable_scroll_animator); |
| 396 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); | 404 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); |
| 397 | 405 |
| 398 settings->setCSSStickyPositionEnabled(css_sticky_position_enabled); | 406 settings->setCSSStickyPositionEnabled(css_sticky_position_enabled); |
| 399 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled); | 407 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled); |
| 400 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled); | 408 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled); |
| 401 settings->setExperimentalCSSVariablesEnabled(css_variables_enabled); | 409 settings->setExperimentalCSSVariablesEnabled(css_variables_enabled); |
| 402 | 410 |
| 403 settings->setDeviceSupportsTouch(device_supports_touch); | 411 settings->setDeviceSupportsTouch(device_supports_touch); |
| 404 settings->setDeviceSupportsMouse(device_supports_mouse); | 412 settings->setDeviceSupportsMouse(device_supports_mouse); |
| 405 | 413 |
| 406 settings->setDefaultTileSize( | 414 settings->setDefaultTileSize( |
| 407 WebSize(default_tile_width, default_tile_height)); | 415 WebSize(default_tile_width, default_tile_height)); |
| 408 settings->setMaxUntiledLayerSize( | 416 settings->setMaxUntiledLayerSize( |
| 409 WebSize(max_untiled_layer_width, max_untiled_layer_height)); | 417 WebSize(max_untiled_layer_width, max_untiled_layer_height)); |
| 410 | 418 |
| 411 settings->setFixedPositionCreatesStackingContext( | 419 settings->setFixedPositionCreatesStackingContext( |
| 412 fixed_position_creates_stacking_context); | 420 fixed_position_creates_stacking_context); |
| 413 | 421 |
| 414 WebNetworkStateNotifier::setOnLine(is_online); | 422 WebNetworkStateNotifier::setOnLine(is_online); |
| 415 } | 423 } |
| 416 | 424 |
| 417 } // namespace webkit_glue | 425 } // namespace webkit_glue |
| OLD | NEW |