[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ui/views/views_switches.h" |
| 6 | |
| 7 | #include "base/command_line.h" |
| 8 | |
| 9 | namespace views { |
| 10 | namespace switches { |
| 11 | |
| 12 | // Please keep alphabetized. |
| 13 | |
| 14 | // Specifies if a heuristic should be used to determine the most probable |
| 15 | // target of a gesture, where the touch region is represented by a rectangle. |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame^] | 16 | const char kDisableViewsRectBasedTargeting[] = |
| 17 | "disable-views-rect-based-targeting"; |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 18 | |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame^] | 19 | bool IsRectBasedTargetingEnabled() { |
| 20 | #if defined(OS_CHROMEOS) || defined(OS_WIN) |
| 21 | return !CommandLine::ForCurrentProcess()-> |
| 22 | HasSwitch(kDisableViewsRectBasedTargeting); |
| 23 | #else |
| 24 | return false; |
| 25 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | } // namespace switches |
| 29 | } // namespace views |