OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/views/views_switches.h" | 5 #include "ui/views/views_switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
11 namespace switches { | 11 namespace switches { |
12 | 12 |
13 // Please keep alphabetized. | 13 // Please keep alphabetized. |
14 | 14 |
15 // Specifies if a heuristic should be used to determine the most probable | 15 // Specifies if a heuristic should be used to determine the most probable |
16 // target of a gesture, where the touch region is represented by a rectangle. | 16 // target of a gesture, where the touch region is represented by a rectangle. |
17 const char kDisableViewsRectBasedTargeting[] = | 17 const char kDisableViewsRectBasedTargeting[] = |
18 "disable-views-rect-based-targeting"; | 18 "disable-views-rect-based-targeting"; |
19 | 19 |
| 20 // Draws a semitransparent rect to indicate the bounds of each view. |
| 21 const char kDrawViewBoundsRects[] = "draw-view-bounds-rects"; |
| 22 |
20 bool IsRectBasedTargetingEnabled() { | 23 bool IsRectBasedTargetingEnabled() { |
21 #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) | 24 #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) |
22 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 25 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
23 kDisableViewsRectBasedTargeting); | 26 kDisableViewsRectBasedTargeting); |
24 #else | 27 #else |
25 return false; | 28 return false; |
26 #endif | 29 #endif |
27 } | 30 } |
28 | 31 |
29 } // namespace switches | 32 } // namespace switches |
30 } // namespace views | 33 } // namespace views |
OLD | NEW |