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

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

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to account for re-naming to PaintedScrollbarLayer. Created 7 years, 3 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 prefs.region_based_columns_enabled = 545 prefs.region_based_columns_enabled =
546 command_line.HasSwitch(switches::kEnableRegionBasedColumns); 546 command_line.HasSwitch(switches::kEnableRegionBasedColumns);
547 prefs.threaded_html_parser = 547 prefs.threaded_html_parser =
548 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); 548 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser);
549 prefs.experimental_websocket_enabled = 549 prefs.experimental_websocket_enabled =
550 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); 550 command_line.HasSwitch(switches::kEnableExperimentalWebSocket);
551 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { 551 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) {
552 prefs.pinch_virtual_viewport_enabled = true; 552 prefs.pinch_virtual_viewport_enabled = true;
553 prefs.pinch_overlay_scrollbar_thickness = 10; 553 prefs.pinch_overlay_scrollbar_thickness = 10;
554 } 554 }
555 prefs.use_solid_color_scrollbars =
556 command_line.HasSwitch(switches::kUseSolidColorScrollbars);
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 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 563 prefs.touch_enabled = ui::AreTouchEventsEnabled();
562 prefs.device_supports_touch = prefs.touch_enabled && 564 prefs.device_supports_touch = prefs.touch_enabled &&
563 ui::IsTouchDevicePresent(); 565 ui::IsTouchDevicePresent();
564 #if defined(OS_ANDROID) 566 #if defined(OS_ANDROID)
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 } 3747 }
3746 3748
3747 void WebContentsImpl::ClearAllPowerSaveBlockers() { 3749 void WebContentsImpl::ClearAllPowerSaveBlockers() {
3748 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); 3750 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
3749 i != power_save_blockers_.end(); ++i) 3751 i != power_save_blockers_.end(); ++i)
3750 STLDeleteValues(&power_save_blockers_[i->first]); 3752 STLDeleteValues(&power_save_blockers_[i->first]);
3751 power_save_blockers_.clear(); 3753 power_save_blockers_.clear();
3752 } 3754 }
3753 3755
3754 } // namespace content 3756 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698