[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" | ||||
avi | fba04a5 | 2015-12-23 06:53:04 | [diff] [blame] | 8 | #include "build/build_config.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 9 | |
10 | namespace views { | ||||
11 | namespace switches { | ||||
12 | |||||
13 | // Please keep alphabetized. | ||||
14 | |||||
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. | ||||
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 17 | const char kDisableViewsRectBasedTargeting[] = |
18 | "disable-views-rect-based-targeting"; | ||||
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 19 | |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 20 | bool IsRectBasedTargetingEnabled() { |
[email protected] | 42f5fe54 | 2014-07-25 17:59:33 | [diff] [blame] | 21 | #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) |
avi | 6b10fd0 | 2014-12-23 05:51:23 | [diff] [blame] | 22 | return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
23 | kDisableViewsRectBasedTargeting); | ||||
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 24 | #else |
25 | return false; | ||||
26 | #endif | ||||
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 27 | } |
28 | |||||
29 | } // namespace switches | ||||
30 | } // namespace views |