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

Side by Side Diff: ui/events/gestures/gesture_recognizer_impl.cc

Issue 315713002: Enable unified GR by default in Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix SimulateTapAt to include a non-zero timestamp on the touch events. 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/events/gestures/gesture_recognizer_impl.h" 5 #include "ui/events/gestures/gesture_recognizer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 GestureProviderAura* CreateGestureProvider(GestureProviderAuraClient* client) { 62 GestureProviderAura* CreateGestureProvider(GestureProviderAuraClient* client) {
63 return new GestureProviderAura(client); 63 return new GestureProviderAura(client);
64 } 64 }
65 65
66 } // namespace 66 } // namespace
67 67
68 //////////////////////////////////////////////////////////////////////////////// 68 ////////////////////////////////////////////////////////////////////////////////
69 // GestureRecognizerImpl, public: 69 // GestureRecognizerImpl, public:
70 70
71 GestureRecognizerImpl::GestureRecognizerImpl() { 71 GestureRecognizerImpl::GestureRecognizerImpl() {
72 // Default to not using the unified gesture detector. 72 // Default to using the unified gesture detector.
73 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 73 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
74 const std::string unified_gd_enabled_switch = 74 const std::string unified_gd_enabled_switch =
75 command_line.HasSwitch(switches::kUnifiedGestureDetector) ? 75 command_line.HasSwitch(switches::kUnifiedGestureDetector) ?
76 command_line.GetSwitchValueASCII(switches::kUnifiedGestureDetector) : 76 command_line.GetSwitchValueASCII(switches::kUnifiedGestureDetector) :
77 switches::kUnifiedGestureDetectorAuto; 77 switches::kUnifiedGestureDetectorAuto;
78 78
79 const bool kUseUnifiedGestureDetectorByDefault = false; 79 const bool kUseUnifiedGestureDetectorByDefault = true;
80 if (unified_gd_enabled_switch.empty() || 80 if (unified_gd_enabled_switch.empty() ||
81 unified_gd_enabled_switch == switches::kUnifiedGestureDetectorEnabled) { 81 unified_gd_enabled_switch == switches::kUnifiedGestureDetectorEnabled) {
82 use_unified_gesture_detector_ = true; 82 use_unified_gesture_detector_ = true;
83 } else if (unified_gd_enabled_switch == 83 } else if (unified_gd_enabled_switch ==
84 switches::kUnifiedGestureDetectorDisabled) { 84 switches::kUnifiedGestureDetectorDisabled) {
85 use_unified_gesture_detector_ = false; 85 use_unified_gesture_detector_ = false;
86 } else if (unified_gd_enabled_switch == 86 } else if (unified_gd_enabled_switch ==
87 switches::kUnifiedGestureDetectorAuto) { 87 switches::kUnifiedGestureDetectorAuto) {
88 use_unified_gesture_detector_ = kUseUnifiedGestureDetectorByDefault; 88 use_unified_gesture_detector_ = kUseUnifiedGestureDetectorByDefault;
89 } else { 89 } else {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 std::vector<GestureEventHelper*>::iterator it; 412 std::vector<GestureEventHelper*>::iterator it;
413 for (it = helpers.begin(); it != helpers.end(); ++it) 413 for (it = helpers.begin(); it != helpers.end(); ++it)
414 gesture_recognizer->AddGestureEventHelper(*it); 414 gesture_recognizer->AddGestureEventHelper(*it);
415 415
416 helpers.clear(); 416 helpers.clear();
417 g_gesture_recognizer_instance = 417 g_gesture_recognizer_instance =
418 static_cast<GestureRecognizerImpl*>(gesture_recognizer); 418 static_cast<GestureRecognizerImpl*>(gesture_recognizer);
419 } 419 }
420 420
421 } // namespace ui 421 } // namespace ui
OLDNEW
« content/public/test/browser_test_utils.cc ('K') | « content/public/test/browser_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698