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

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

Issue 12077002: adding DiscardableMemory preferences for deferred image decoding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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/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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 device_supports_touch(false), 120 device_supports_touch(false),
121 device_supports_mouse(true), 121 device_supports_mouse(true),
122 touch_adjustment_enabled(true), 122 touch_adjustment_enabled(true),
123 default_tile_width(256), 123 default_tile_width(256),
124 default_tile_height(256), 124 default_tile_height(256),
125 max_untiled_layer_width(512), 125 max_untiled_layer_width(512),
126 max_untiled_layer_height(512), 126 max_untiled_layer_height(512),
127 fixed_position_creates_stacking_context(false), 127 fixed_position_creates_stacking_context(false),
128 sync_xhr_in_documents_enabled(true), 128 sync_xhr_in_documents_enabled(true),
129 deferred_image_decoding_enabled(false), 129 deferred_image_decoding_enabled(false),
130 discardable_memory_limit_mb(32),
131 discardable_memory_entry_limit(128),
130 should_respect_image_orientation(false), 132 should_respect_image_orientation(false),
131 number_of_cpu_cores(1), 133 number_of_cpu_cores(1),
132 #if defined(OS_MACOSX) 134 #if defined(OS_MACOSX)
133 editing_behavior(EDITING_BEHAVIOR_MAC), 135 editing_behavior(EDITING_BEHAVIOR_MAC),
134 #elif defined(OS_WIN) 136 #elif defined(OS_WIN)
135 editing_behavior(EDITING_BEHAVIOR_WIN), 137 editing_behavior(EDITING_BEHAVIOR_WIN),
136 #elif defined(OS_POSIX) 138 #elif defined(OS_POSIX)
137 editing_behavior(EDITING_BEHAVIOR_UNIX), 139 editing_behavior(EDITING_BEHAVIOR_UNIX),
138 #else 140 #else
139 editing_behavior(EDITING_BEHAVIOR_MAC), 141 editing_behavior(EDITING_BEHAVIOR_MAC),
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 468
467 settings->setDefaultTileSize( 469 settings->setDefaultTileSize(
468 WebSize(default_tile_width, default_tile_height)); 470 WebSize(default_tile_width, default_tile_height));
469 settings->setMaxUntiledLayerSize( 471 settings->setMaxUntiledLayerSize(
470 WebSize(max_untiled_layer_width, max_untiled_layer_height)); 472 WebSize(max_untiled_layer_width, max_untiled_layer_height));
471 473
472 settings->setFixedPositionCreatesStackingContext( 474 settings->setFixedPositionCreatesStackingContext(
473 fixed_position_creates_stacking_context); 475 fixed_position_creates_stacking_context);
474 476
475 settings->setDeferredImageDecodingEnabled(deferred_image_decoding_enabled); 477 settings->setDeferredImageDecodingEnabled(deferred_image_decoding_enabled);
478 settings->setDiscardableMemoryLimitMB(discardable_memory_limit_mb);
479 settings->setDiscardableMemoryEntryLimit(discardable_memory_entry_limit);
476 settings->setShouldRespectImageOrientation(should_respect_image_orientation); 480 settings->setShouldRespectImageOrientation(should_respect_image_orientation);
477 481
478 settings->setUnsafePluginPastingEnabled(false); 482 settings->setUnsafePluginPastingEnabled(false);
479 settings->setEditingBehavior( 483 settings->setEditingBehavior(
480 static_cast<WebSettings::EditingBehavior>(editing_behavior)); 484 static_cast<WebSettings::EditingBehavior>(editing_behavior));
481 485
482 settings->setSupportsMultipleWindows(supports_multiple_windows); 486 settings->setSupportsMultipleWindows(supports_multiple_windows);
483 487
484 settings->setViewportEnabled(viewport_enabled); 488 settings->setViewportEnabled(viewport_enabled);
485 489
(...skipping 17 matching lines...) Expand all
503 mismatching_enums) 507 mismatching_enums)
504 508
505 COMPILE_ASSERT_MATCHING_ENUMS( 509 COMPILE_ASSERT_MATCHING_ENUMS(
506 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac); 510 WebPreferences::EDITING_BEHAVIOR_MAC, WebSettings::EditingBehaviorMac);
507 COMPILE_ASSERT_MATCHING_ENUMS( 511 COMPILE_ASSERT_MATCHING_ENUMS(
508 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin); 512 WebPreferences::EDITING_BEHAVIOR_WIN, WebSettings::EditingBehaviorWin);
509 COMPILE_ASSERT_MATCHING_ENUMS( 513 COMPILE_ASSERT_MATCHING_ENUMS(
510 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix); 514 WebPreferences::EDITING_BEHAVIOR_UNIX, WebSettings::EditingBehaviorUnix);
511 515
512 } // namespace webkit_glue 516 } // 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