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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 prefs.css_shaders_enabled = | 531 prefs.css_shaders_enabled = |
532 command_line.HasSwitch(switches::kEnableCssShaders); | 532 command_line.HasSwitch(switches::kEnableCssShaders); |
533 prefs.css_grid_layout_enabled = | 533 prefs.css_grid_layout_enabled = |
534 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); | 534 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); |
535 prefs.lazy_layout_enabled = | 535 prefs.lazy_layout_enabled = |
536 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); | 536 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); |
537 prefs.threaded_html_parser = | 537 prefs.threaded_html_parser = |
538 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); | 538 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); |
539 prefs.experimental_websocket_enabled = | 539 prefs.experimental_websocket_enabled = |
540 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); | 540 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); |
| 541 prefs.pinch_virtual_viewport_enabled = |
| 542 command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport); |
541 | 543 |
542 #if defined(OS_ANDROID) | 544 #if defined(OS_ANDROID) |
543 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 545 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
544 switches::kDisableGestureRequirementForMediaPlayback); | 546 switches::kDisableGestureRequirementForMediaPlayback); |
545 #endif | 547 #endif |
546 | 548 |
547 bool touch_device_present = false; | 549 bool touch_device_present = false; |
548 touch_device_present = ui::IsTouchDevicePresent(); | 550 touch_device_present = ui::IsTouchDevicePresent(); |
549 const std::string touch_enabled_switch = | 551 const std::string touch_enabled_switch = |
550 command_line.HasSwitch(switches::kTouchEvents) ? | 552 command_line.HasSwitch(switches::kTouchEvents) ? |
(...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3573 } | 3575 } |
3574 | 3576 |
3575 BrowserPluginGuestManager* | 3577 BrowserPluginGuestManager* |
3576 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3578 WebContentsImpl::GetBrowserPluginGuestManager() const { |
3577 return static_cast<BrowserPluginGuestManager*>( | 3579 return static_cast<BrowserPluginGuestManager*>( |
3578 GetBrowserContext()->GetUserData( | 3580 GetBrowserContext()->GetUserData( |
3579 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3581 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
3580 } | 3582 } |
3581 | 3583 |
3582 } // namespace content | 3584 } // namespace content |
OLD | NEW |