Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 11192057: [Android] Add supportMultipleWindows setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed, moved fields in WebPreferences. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 text_autosizing_enabled(true),
104 font_scale_factor(1.0f),
105 force_enable_zoom(false),
106 user_gesture_required_for_media_playback(true),
107 #endif
108 password_echo_enabled(false), 102 password_echo_enabled(false),
109 should_print_backgrounds(false), 103 should_print_backgrounds(false),
110 enable_scroll_animator(false), 104 enable_scroll_animator(false),
111 visual_word_movement_enabled(false), 105 visual_word_movement_enabled(false),
112 css_sticky_position_enabled(false), 106 css_sticky_position_enabled(false),
113 css_regions_enabled(false), 107 css_regions_enabled(false),
114 css_shaders_enabled(false), 108 css_shaders_enabled(false),
115 css_variables_enabled(false), 109 css_variables_enabled(false),
116 device_supports_touch(false), 110 device_supports_touch(false),
117 device_supports_mouse(true), 111 device_supports_mouse(true),
118 default_tile_width(256), 112 default_tile_width(256),
119 default_tile_height(256), 113 default_tile_height(256),
120 max_untiled_layer_width(512), 114 max_untiled_layer_width(512),
121 max_untiled_layer_height(512), 115 max_untiled_layer_height(512),
122 fixed_position_creates_stacking_context(false), 116 fixed_position_creates_stacking_context(false),
123 sync_xhr_in_documents_enabled(true), 117 sync_xhr_in_documents_enabled(true),
124 number_of_cpu_cores(1), 118 number_of_cpu_cores(1),
125 cookie_enabled(true), 119 cookie_enabled(true),
126 apply_page_scale_factor_in_compositor(false) { 120 apply_page_scale_factor_in_compositor(false)
121 #if defined(OS_ANDROID)
122 ,
123 text_autosizing_enabled(true),
124 font_scale_factor(1.0f),
125 force_enable_zoom(false),
126 user_gesture_required_for_media_playback(true),
127 supports_multiple_windows(true)
128 #endif
129 {
127 standard_font_family_map[kCommonScript] = 130 standard_font_family_map[kCommonScript] =
128 ASCIIToUTF16("Times New Roman"); 131 ASCIIToUTF16("Times New Roman");
129 fixed_font_family_map[kCommonScript] = 132 fixed_font_family_map[kCommonScript] =
130 ASCIIToUTF16("Courier New"); 133 ASCIIToUTF16("Courier New");
131 serif_font_family_map[kCommonScript] = 134 serif_font_family_map[kCommonScript] =
132 ASCIIToUTF16("Times New Roman"); 135 ASCIIToUTF16("Times New Roman");
133 sans_serif_font_family_map[kCommonScript] = 136 sans_serif_font_family_map[kCommonScript] =
134 ASCIIToUTF16("Arial"); 137 ASCIIToUTF16("Arial");
135 cursive_font_family_map[kCommonScript] = 138 cursive_font_family_map[kCommonScript] =
136 ASCIIToUTF16("Script"); 139 ASCIIToUTF16("Script");
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 405
403 // Tabs to link is not part of the settings. WebCore calls 406 // Tabs to link is not part of the settings. WebCore calls
404 // ChromeClient::tabsToLinks which is part of the glue code. 407 // ChromeClient::tabsToLinks which is part of the glue code.
405 web_view->setTabsToLinks(tabs_to_links); 408 web_view->setTabsToLinks(tabs_to_links);
406 409
407 settings->setInteractiveFormValidationEnabled(true); 410 settings->setInteractiveFormValidationEnabled(true);
408 411
409 settings->setFullScreenEnabled(fullscreen_enabled); 412 settings->setFullScreenEnabled(fullscreen_enabled);
410 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); 413 settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content);
411 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); 414 settings->setAllowRunningOfInsecureContent(allow_running_insecure_content);
412 #if defined(OS_ANDROID)
413 settings->setTextAutosizingEnabled(text_autosizing_enabled);
414 settings->setTextAutosizingFontScaleFactor(font_scale_factor);
415 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom);
416 settings->setAutoZoomFocusedNodeToLegibleScale(true);
417 settings->setDoubleTapToZoomEnabled(true);
418 settings->setMediaPlaybackRequiresUserGesture(
419 user_gesture_required_for_media_playback);
420 #endif
421 settings->setPasswordEchoEnabled(password_echo_enabled); 415 settings->setPasswordEchoEnabled(password_echo_enabled);
422 settings->setShouldPrintBackgrounds(should_print_backgrounds); 416 settings->setShouldPrintBackgrounds(should_print_backgrounds);
423 settings->setEnableScrollAnimator(enable_scroll_animator); 417 settings->setEnableScrollAnimator(enable_scroll_animator);
424 settings->setVisualWordMovementEnabled(visual_word_movement_enabled); 418 settings->setVisualWordMovementEnabled(visual_word_movement_enabled);
425 419
426 settings->setCSSStickyPositionEnabled(css_sticky_position_enabled); 420 settings->setCSSStickyPositionEnabled(css_sticky_position_enabled);
427 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled); 421 settings->setExperimentalCSSRegionsEnabled(css_regions_enabled);
428 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled); 422 settings->setExperimentalCSSCustomFilterEnabled(css_shaders_enabled);
429 settings->setExperimentalCSSVariablesEnabled(css_variables_enabled); 423 settings->setExperimentalCSSVariablesEnabled(css_variables_enabled);
430 424
431 settings->setDeviceSupportsTouch(device_supports_touch); 425 settings->setDeviceSupportsTouch(device_supports_touch);
432 settings->setDeviceSupportsMouse(device_supports_mouse); 426 settings->setDeviceSupportsMouse(device_supports_mouse);
433 427
434 settings->setDefaultTileSize( 428 settings->setDefaultTileSize(
435 WebSize(default_tile_width, default_tile_height)); 429 WebSize(default_tile_width, default_tile_height));
436 settings->setMaxUntiledLayerSize( 430 settings->setMaxUntiledLayerSize(
437 WebSize(max_untiled_layer_width, max_untiled_layer_height)); 431 WebSize(max_untiled_layer_width, max_untiled_layer_height));
438 432
439 settings->setFixedPositionCreatesStackingContext( 433 settings->setFixedPositionCreatesStackingContext(
440 fixed_position_creates_stacking_context); 434 fixed_position_creates_stacking_context);
441 435
442 settings->setApplyPageScaleFactorInCompositor( 436 settings->setApplyPageScaleFactorInCompositor(
443 apply_page_scale_factor_in_compositor); 437 apply_page_scale_factor_in_compositor);
444 438
439 #if defined(OS_ANDROID)
440 settings->setTextAutosizingEnabled(text_autosizing_enabled);
441 settings->setTextAutosizingFontScaleFactor(font_scale_factor);
442 web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom);
443 settings->setAutoZoomFocusedNodeToLegibleScale(true);
444 settings->setDoubleTapToZoomEnabled(true);
445 settings->setMediaPlaybackRequiresUserGesture(
446 user_gesture_required_for_media_playback);
447 settings->setSupportsMultipleWindows(supports_multiple_windows);
448 #endif
449
445 WebNetworkStateNotifier::setOnLine(is_online); 450 WebNetworkStateNotifier::setOnLine(is_online);
446 } 451 }
447 452
448 } // namespace webkit_glue 453 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698