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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 15567005: Plumb pinch virtual viewport flag to CC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised to share setting with Blink also. Created 7 years, 7 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
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 "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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 prefs.css_shaders_enabled = 508 prefs.css_shaders_enabled =
509 command_line.HasSwitch(switches::kEnableCssShaders); 509 command_line.HasSwitch(switches::kEnableCssShaders);
510 prefs.css_grid_layout_enabled = 510 prefs.css_grid_layout_enabled =
511 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); 511 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures);
512 prefs.lazy_layout_enabled = 512 prefs.lazy_layout_enabled =
513 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures); 513 command_line.HasSwitch(switches::kEnableExperimentalWebKitFeatures);
514 prefs.threaded_html_parser = 514 prefs.threaded_html_parser =
515 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); 515 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser);
516 prefs.experimental_websocket_enabled = 516 prefs.experimental_websocket_enabled =
517 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); 517 command_line.HasSwitch(switches::kEnableExperimentalWebSocket);
518 prefs.pinch_virtual_viewport_enabled =
519 command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport);
518 520
519 #if defined(OS_ANDROID) 521 #if defined(OS_ANDROID)
520 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 522 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
521 switches::kDisableGestureRequirementForMediaPlayback); 523 switches::kDisableGestureRequirementForMediaPlayback);
522 #endif 524 #endif
523 525
524 bool touch_device_present = false; 526 bool touch_device_present = false;
525 touch_device_present = ui::IsTouchDevicePresent(); 527 touch_device_present = ui::IsTouchDevicePresent();
526 const std::string touch_enabled_switch = 528 const std::string touch_enabled_switch =
527 command_line.HasSwitch(switches::kTouchEvents) ? 529 command_line.HasSwitch(switches::kTouchEvents) ?
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 } 3525 }
3524 3526
3525 BrowserPluginGuestManager* 3527 BrowserPluginGuestManager*
3526 WebContentsImpl::GetBrowserPluginGuestManager() const { 3528 WebContentsImpl::GetBrowserPluginGuestManager() const {
3527 return static_cast<BrowserPluginGuestManager*>( 3529 return static_cast<BrowserPluginGuestManager*>(
3528 GetBrowserContext()->GetUserData( 3530 GetBrowserContext()->GetUserData(
3529 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3531 browser_plugin::kBrowserPluginGuestManagerKeyName));
3530 } 3532 }
3531 3533
3532 } // namespace content 3534 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698