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

Side by Side Diff: ui/chromeos/touch_exploration_controller.h

Issue 367263005: Revert of Added touch event permutations test to touch_exploration_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_passthrough
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | ui/chromeos/touch_exploration_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ 5 #ifndef UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_
6 #define UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ 6 #define UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_
7 7
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "ui/chromeos/ui_chromeos_export.h" 10 #include "ui/chromeos/ui_chromeos_export.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // 83 //
84 // The caller is expected to retain ownership of instances of this class and 84 // The caller is expected to retain ownership of instances of this class and
85 // destroy them before |root_window| is destroyed. 85 // destroy them before |root_window| is destroyed.
86 class UI_CHROMEOS_EXPORT TouchExplorationController 86 class UI_CHROMEOS_EXPORT TouchExplorationController
87 : public ui::EventRewriter { 87 : public ui::EventRewriter {
88 public: 88 public:
89 explicit TouchExplorationController(aura::Window* root_window); 89 explicit TouchExplorationController(aura::Window* root_window);
90 virtual ~TouchExplorationController(); 90 virtual ~TouchExplorationController();
91 91
92 void CallTapTimerNowForTesting(); 92 void CallTapTimerNowForTesting();
93 void CallTapTimerNowIfRunningForTesting();
94 void SetEventHandlerForTesting(ui::EventHandler* event_handler_for_testing); 93 void SetEventHandlerForTesting(ui::EventHandler* event_handler_for_testing);
95 bool IsInNoFingersDownStateForTesting() const; 94 bool IsInNoFingersDownStateForTesting() const;
96 // VLOGs should be suppressed in tests that generate a lot of logs,
97 // for example permutations of nine touch events.
98 void SuppressVLOGsForTesting(bool suppress);
99 95
100 private: 96 private:
101 // Overridden from ui::EventRewriter 97 // Overridden from ui::EventRewriter
102 virtual ui::EventRewriteStatus RewriteEvent( 98 virtual ui::EventRewriteStatus RewriteEvent(
103 const ui::Event& event, 99 const ui::Event& event,
104 scoped_ptr<ui::Event>* rewritten_event) OVERRIDE; 100 scoped_ptr<ui::Event>* rewritten_event) OVERRIDE;
105 virtual ui::EventRewriteStatus NextDispatchEvent( 101 virtual ui::EventRewriteStatus NextDispatchEvent(
106 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE; 102 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE;
107 103
108 // Event handlers based on the current state - see State, below. 104 // Event handlers based on the current state - see State, below.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // A default gesture detector config, so we can share the same 243 // A default gesture detector config, so we can share the same
248 // timeout and pixel slop constants. 244 // timeout and pixel slop constants.
249 ui::GestureDetector::Config gesture_detector_config_; 245 ui::GestureDetector::Config gesture_detector_config_;
250 246
251 // The previous state entered. 247 // The previous state entered.
252 State prev_state_; 248 State prev_state_;
253 249
254 // A copy of the previous event passed. 250 // A copy of the previous event passed.
255 scoped_ptr<ui::TouchEvent> prev_event_; 251 scoped_ptr<ui::TouchEvent> prev_event_;
256 252
257 // This toggles whether VLOGS are turned on or not.
258 bool VLOG_on_;
259
260 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); 253 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController);
261 }; 254 };
262 255
263 } // namespace ui 256 } // namespace ui
264 257
265 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ 258 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/chromeos/touch_exploration_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698