| 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 prefs.css_grid_layout_enabled = | 543 prefs.css_grid_layout_enabled = |
| 544 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); | 544 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); |
| 545 prefs.lazy_layout_enabled = | 545 prefs.lazy_layout_enabled = |
| 546 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); | 546 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); |
| 547 prefs.region_based_columns_enabled = | 547 prefs.region_based_columns_enabled = |
| 548 command_line.HasSwitch(switches::kEnableRegionBasedColumns); | 548 command_line.HasSwitch(switches::kEnableRegionBasedColumns); |
| 549 prefs.threaded_html_parser = | 549 prefs.threaded_html_parser = |
| 550 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); | 550 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); |
| 551 prefs.experimental_websocket_enabled = | 551 prefs.experimental_websocket_enabled = |
| 552 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); | 552 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); |
| 553 prefs.pinch_virtual_viewport_enabled = | 553 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { |
| 554 command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport); | 554 prefs.pinch_virtual_viewport_enabled = true; |
| 555 prefs.pinch_overlay_scrollbar_thickness = 10; |
| 556 } |
| 555 | 557 |
| 556 #if defined(OS_ANDROID) | 558 #if defined(OS_ANDROID) |
| 557 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 559 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| 558 switches::kDisableGestureRequirementForMediaPlayback); | 560 switches::kDisableGestureRequirementForMediaPlayback); |
| 559 #endif | 561 #endif |
| 560 | 562 |
| 561 bool touch_device_present = false; | 563 bool touch_device_present = false; |
| 562 touch_device_present = ui::IsTouchDevicePresent(); | 564 touch_device_present = ui::IsTouchDevicePresent(); |
| 563 const std::string touch_enabled_switch = | 565 const std::string touch_enabled_switch = |
| 564 command_line.HasSwitch(switches::kTouchEvents) ? | 566 command_line.HasSwitch(switches::kTouchEvents) ? |
| (...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3669 } | 3671 } |
| 3670 | 3672 |
| 3671 BrowserPluginGuestManager* | 3673 BrowserPluginGuestManager* |
| 3672 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3674 WebContentsImpl::GetBrowserPluginGuestManager() const { |
| 3673 return static_cast<BrowserPluginGuestManager*>( | 3675 return static_cast<BrowserPluginGuestManager*>( |
| 3674 GetBrowserContext()->GetUserData( | 3676 GetBrowserContext()->GetUserData( |
| 3675 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3677 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
| 3676 } | 3678 } |
| 3677 | 3679 |
| 3678 } // namespace content | 3680 } // namespace content |
| OLD | NEW |