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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 254393008: Enabling new-style 'virtual viewport' pinch by default on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 | « chrome/browser/about_flags.cc ('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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 prefs.accelerated_compositing_for_3d_transforms_enabled = 429 prefs.accelerated_compositing_for_3d_transforms_enabled =
430 prefs.accelerated_compositing_for_animation_enabled = 430 prefs.accelerated_compositing_for_animation_enabled =
431 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 431 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
432 prefs.accelerated_compositing_for_plugins_enabled = true; 432 prefs.accelerated_compositing_for_plugins_enabled = true;
433 prefs.accelerated_compositing_for_video_enabled = 433 prefs.accelerated_compositing_for_video_enabled =
434 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); 434 !command_line.HasSwitch(switches::kDisableAcceleratedVideo);
435 prefs.lazy_layout_enabled = 435 prefs.lazy_layout_enabled =
436 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures); 436 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures);
437 prefs.region_based_columns_enabled = 437 prefs.region_based_columns_enabled =
438 command_line.HasSwitch(switches::kEnableRegionBasedColumns); 438 command_line.HasSwitch(switches::kEnableRegionBasedColumns);
439 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { 439
440 #if defined(OS_CHROMEOS)
441 bool enable_pinch_virtual_viewport = true;
442 #else
443 bool enable_pinch_virtual_viewport =
444 command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport);
445 #endif
446 if (enable_pinch_virtual_viewport) {
440 prefs.pinch_virtual_viewport_enabled = true; 447 prefs.pinch_virtual_viewport_enabled = true;
441 prefs.pinch_overlay_scrollbar_thickness = 10; 448 prefs.pinch_overlay_scrollbar_thickness = 10;
442 } 449 }
443 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); 450 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled();
444 451
445 #if defined(OS_ANDROID) 452 #if defined(OS_ANDROID)
446 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 453 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
447 switches::kDisableGestureRequirementForMediaPlayback); 454 switches::kDisableGestureRequirementForMediaPlayback);
448 #endif 455 #endif
449 456
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 return true; 1765 return true;
1759 } 1766 }
1760 1767
1761 void RenderViewHostImpl::AttachToFrameTree() { 1768 void RenderViewHostImpl::AttachToFrameTree() {
1762 FrameTree* frame_tree = delegate_->GetFrameTree(); 1769 FrameTree* frame_tree = delegate_->GetFrameTree();
1763 1770
1764 frame_tree->ResetForMainFrameSwap(); 1771 frame_tree->ResetForMainFrameSwap();
1765 } 1772 }
1766 1773
1767 } // namespace content 1774 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698