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 "cc/base/switches.h" | 5 #include "cc/base/switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 namespace switches { | 10 namespace switches { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // is not considered to be occluding the pixels behind it. | 124 // is not considered to be occluding the pixels behind it. |
125 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; | 125 const char kShowNonOccludingRects[] = "show-nonoccluding-rects"; |
126 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; | 126 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects"; |
127 | 127 |
128 // Enable the codepath that uses images within TileManager. | 128 // Enable the codepath that uses images within TileManager. |
129 const char kUseMapImage[] = "use-map-image"; | 129 const char kUseMapImage[] = "use-map-image"; |
130 | 130 |
131 // Prevents the layer tree unit tests from timing out. | 131 // Prevents the layer tree unit tests from timing out. |
132 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; | 132 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; |
133 | 133 |
| 134 // Enables overlay scrollbars on Aura or Linux. Does nothing on Mac. |
| 135 const char kEnableOverlayScrollbars[] = "enable-overlay-scrollbars"; |
| 136 |
| 137 // Solid-color scrollbar color in hex ARGB format, e.g. 0x80808080. |
| 138 // The 0x/0X prefix is optional. |
| 139 const char kSolidColorScrollbarColor[] = "solid-color-scrollbar-color"; |
| 140 |
| 141 bool AreOverlayScrollbarsEnabled() { |
| 142 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 143 cc::switches::kEnableOverlayScrollbars); |
| 144 } |
| 145 |
134 bool IsImplSidePaintingEnabled() { | 146 bool IsImplSidePaintingEnabled() { |
135 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 147 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
136 | 148 |
137 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) | 149 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) |
138 return false; | 150 return false; |
139 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) | 151 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) |
140 return true; | 152 return true; |
141 | 153 |
142 #if defined(OS_ANDROID) | 154 #if defined(OS_ANDROID) |
143 return true; | 155 return true; |
144 #else | 156 #else |
145 return false; | 157 return false; |
146 #endif | 158 #endif |
147 } | 159 } |
148 | 160 |
149 } // namespace switches | 161 } // namespace switches |
150 } // namespace cc | 162 } // namespace cc |
OLD | NEW |