blob: 9fa09fc3c119f9da2f558206fffe87e73fe9dd9e [file] [log] [blame]
[email protected]c4f51d22013-11-05 03:11:261// 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"
avifba04a52015-12-23 06:53:048#include "build/build_config.h"
[email protected]c4f51d22013-11-05 03:11:269
10namespace views {
11namespace 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]88b47ad72013-11-21 03:34:3817const char kDisableViewsRectBasedTargeting[] =
18 "disable-views-rect-based-targeting";
[email protected]c4f51d22013-11-05 03:11:2619
[email protected]88b47ad72013-11-21 03:34:3820bool IsRectBasedTargetingEnabled() {
[email protected]42f5fe542014-07-25 17:59:3321#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
avi6b10fd02014-12-23 05:51:2322 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
23 kDisableViewsRectBasedTargeting);
[email protected]88b47ad72013-11-21 03:34:3824#else
25 return false;
26#endif
[email protected]c4f51d22013-11-05 03:11:2627}
28
29} // namespace switches
30} // namespace views