| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 editing_behavior(EDITING_BEHAVIOR_MAC), | 133 editing_behavior(EDITING_BEHAVIOR_MAC), |
| 134 #elif defined(OS_WIN) | 134 #elif defined(OS_WIN) |
| 135 editing_behavior(EDITING_BEHAVIOR_WIN), | 135 editing_behavior(EDITING_BEHAVIOR_WIN), |
| 136 #elif defined(OS_POSIX) | 136 #elif defined(OS_POSIX) |
| 137 editing_behavior(EDITING_BEHAVIOR_UNIX), | 137 editing_behavior(EDITING_BEHAVIOR_UNIX), |
| 138 #else | 138 #else |
| 139 editing_behavior(EDITING_BEHAVIOR_MAC), | 139 editing_behavior(EDITING_BEHAVIOR_MAC), |
| 140 #endif | 140 #endif |
| 141 supports_multiple_windows(true), | 141 supports_multiple_windows(true), |
| 142 viewport_enabled(false), | 142 viewport_enabled(false), |
| 143 record_rendering_stats(false), |
| 143 cookie_enabled(true) | 144 cookie_enabled(true) |
| 144 #if defined(OS_ANDROID) | 145 #if defined(OS_ANDROID) |
| 145 , | 146 , |
| 146 text_autosizing_enabled(true), | 147 text_autosizing_enabled(true), |
| 147 font_scale_factor(1.0f), | 148 font_scale_factor(1.0f), |
| 148 force_enable_zoom(false), | 149 force_enable_zoom(false), |
| 149 user_gesture_required_for_media_playback(true) | 150 user_gesture_required_for_media_playback(true) |
| 150 #endif | 151 #endif |
| 151 { | 152 { |
| 152 standard_font_family_map[kCommonScript] = | 153 standard_font_family_map[kCommonScript] = |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 settings->setMockScrollbarsEnabled(mock_scrollbars_enabled); | 376 settings->setMockScrollbarsEnabled(mock_scrollbars_enabled); |
| 376 | 377 |
| 377 // Display the current compositor tree as overlay if requested on | 378 // Display the current compositor tree as overlay if requested on |
| 378 // the command line | 379 // the command line |
| 379 settings->setShowPlatformLayerTree(show_composited_layer_tree); | 380 settings->setShowPlatformLayerTree(show_composited_layer_tree); |
| 380 | 381 |
| 381 // Display visualization of what has changed on the screen using an | 382 // Display visualization of what has changed on the screen using an |
| 382 // overlay of rects, if requested on the command line. | 383 // overlay of rects, if requested on the command line. |
| 383 settings->setShowPaintRects(show_paint_rects); | 384 settings->setShowPaintRects(show_paint_rects); |
| 384 | 385 |
| 386 // Record rendering stats for benchmarks. |
| 387 settings->setRecordRenderingStats(record_rendering_stats); |
| 388 |
| 385 // Set whether to throttle framerate to Vsync. | 389 // Set whether to throttle framerate to Vsync. |
| 386 settings->setRenderVSyncEnabled(render_vsync_enabled); | 390 settings->setRenderVSyncEnabled(render_vsync_enabled); |
| 387 | 391 |
| 388 // Enable gpu-accelerated compositing if requested on the command line. | 392 // Enable gpu-accelerated compositing if requested on the command line. |
| 389 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); | 393 settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); |
| 390 | 394 |
| 391 // Enable compositing for fixed position elements if requested | 395 // Enable compositing for fixed position elements if requested |
| 392 // on the command line. | 396 // on the command line. |
| 393 settings->setAcceleratedCompositingForFixedPositionEnabled( | 397 settings->setAcceleratedCompositingForFixedPositionEnabled( |
| 394 fixed_position_compositing_enabled); | 398 fixed_position_compositing_enabled); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |