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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 editing_behavior(EDITING_BEHAVIOR_MAC), | 131 editing_behavior(EDITING_BEHAVIOR_MAC), |
132 #endif | 132 #endif |
133 supports_multiple_windows(true), | 133 supports_multiple_windows(true), |
134 viewport_enabled(false), | 134 viewport_enabled(false), |
135 initialize_at_minimum_page_scale(true), | 135 initialize_at_minimum_page_scale(true), |
136 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
137 smart_insert_delete_enabled(true), | 137 smart_insert_delete_enabled(true), |
138 #else | 138 #else |
139 smart_insert_delete_enabled(false), | 139 smart_insert_delete_enabled(false), |
140 #endif | 140 #endif |
| 141 spatial_navigation_enabled(false), |
141 cookie_enabled(true) | 142 cookie_enabled(true) |
142 #if defined(OS_ANDROID) | 143 #if defined(OS_ANDROID) |
143 , | 144 , |
144 text_autosizing_enabled(true), | 145 text_autosizing_enabled(true), |
145 font_scale_factor(1.0f), | 146 font_scale_factor(1.0f), |
146 force_enable_zoom(false), | 147 force_enable_zoom(false), |
147 double_tap_to_zoom_enabled(true), | 148 double_tap_to_zoom_enabled(true), |
148 user_gesture_required_for_media_playback(true), | 149 user_gesture_required_for_media_playback(true), |
149 support_deprecated_target_density_dpi(false) | 150 support_deprecated_target_density_dpi(false) |
150 #endif | 151 #endif |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 settings->setUnsafePluginPastingEnabled(false); | 452 settings->setUnsafePluginPastingEnabled(false); |
452 settings->setEditingBehavior( | 453 settings->setEditingBehavior( |
453 static_cast<WebSettings::EditingBehavior>(editing_behavior)); | 454 static_cast<WebSettings::EditingBehavior>(editing_behavior)); |
454 | 455 |
455 settings->setSupportsMultipleWindows(supports_multiple_windows); | 456 settings->setSupportsMultipleWindows(supports_multiple_windows); |
456 | 457 |
457 settings->setViewportEnabled(viewport_enabled); | 458 settings->setViewportEnabled(viewport_enabled); |
458 settings->setInitializeAtMinimumPageScale(initialize_at_minimum_page_scale); | 459 settings->setInitializeAtMinimumPageScale(initialize_at_minimum_page_scale); |
459 | 460 |
460 settings->setSmartInsertDeleteEnabled(smart_insert_delete_enabled); | 461 settings->setSmartInsertDeleteEnabled(smart_insert_delete_enabled); |
| 462 |
| 463 settings->setSpatialNavigationEnabled(spatial_navigation_enabled); |
| 464 |
461 settings->setSelectionIncludesAltImageText(true); | 465 settings->setSelectionIncludesAltImageText(true); |
462 | 466 |
463 #if defined(OS_ANDROID) | 467 #if defined(OS_ANDROID) |
464 settings->setAllowCustomScrollbarInMainFrame(false); | 468 settings->setAllowCustomScrollbarInMainFrame(false); |
465 settings->setTextAutosizingEnabled(text_autosizing_enabled); | 469 settings->setTextAutosizingEnabled(text_autosizing_enabled); |
466 settings->setTextAutosizingFontScaleFactor(font_scale_factor); | 470 settings->setTextAutosizingFontScaleFactor(font_scale_factor); |
467 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom); | 471 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom); |
468 settings->setAutoZoomFocusedNodeToLegibleScale(true); | 472 settings->setAutoZoomFocusedNodeToLegibleScale(true); |
469 settings->setDoubleTapToZoomEnabled(double_tap_to_zoom_enabled); | 473 settings->setDoubleTapToZoomEnabled(double_tap_to_zoom_enabled); |
470 settings->setMediaPlaybackRequiresUserGesture( | 474 settings->setMediaPlaybackRequiresUserGesture( |
(...skipping 16 matching lines...) Expand all Loading... |
487 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac); | 491 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac); |
488 COMPILE_ASSERT_MATCHING_ENUMS( | 492 COMPILE_ASSERT_MATCHING_ENUMS( |
489 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin); | 493 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin); |
490 COMPILE_ASSERT_MATCHING_ENUMS( | 494 COMPILE_ASSERT_MATCHING_ENUMS( |
491 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix); | 495 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix); |
492 COMPILE_ASSERT_MATCHING_ENUMS( | 496 COMPILE_ASSERT_MATCHING_ENUMS( |
493 WebPreferences::EDITING_BEHAVIOR_ANDROID, | 497 WebPreferences::EDITING_BEHAVIOR_ANDROID, |
494 WebSettings::EditingBehaviorAndroid); | 498 WebSettings::EditingBehaviorAndroid); |
495 | 499 |
496 } // namespace webkit_glue | 500 } // namespace webkit_glue |
OLD | NEW |