Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: trunk/src/ui/events/gestures/unified_gesture_detector_enabled.cc

Issue 330613003: Revert 276728 "Fix slop region boundary handling." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/ui/events/gestures/unified_gesture_detector_enabled.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 "base/command_line.h"
6 #include "base/logging.h"
7 #include "ui/events/event_switches.h"
8 #include "ui/events/gestures/unified_gesture_detector_enabled.h"
9
10 namespace ui {
11
12 bool IsUnifiedGestureDetectorEnabled() {
13 const bool kUseUnifiedGestureDetectorByDefault = false;
14
15 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
16 const std::string unified_gd_enabled_switch =
17 command_line.HasSwitch(switches::kUnifiedGestureDetector) ?
18 command_line.GetSwitchValueASCII(switches::kUnifiedGestureDetector) :
19 switches::kUnifiedGestureDetectorAuto;
20
21 if (unified_gd_enabled_switch.empty() ||
22 unified_gd_enabled_switch == switches::kUnifiedGestureDetectorEnabled) {
23 return true;
24 }
25
26 if (unified_gd_enabled_switch == switches::kUnifiedGestureDetectorDisabled)
27 return false;
28
29 if (unified_gd_enabled_switch == switches::kUnifiedGestureDetectorAuto)
30 return kUseUnifiedGestureDetectorByDefault;
31
32 LOG(ERROR) << "Invalid --unified-gesture-detector option: "
33 << unified_gd_enabled_switch;
34 return false;
35 }
36
37 } // namespace ui
OLDNEW
« no previous file with comments | « trunk/src/ui/events/gestures/unified_gesture_detector_enabled.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698