OLD | NEW |
---|---|
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 Loading... | |
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 SwitchVLOG(bool turn_on); | |
dmazzoni
2014/07/02 23:05:57
I'd call this SwitchVLOGForTesting as-is.
I think
evy
2014/07/02 23:16:03
Done.
| |
93 void SetEventHandlerForTesting(ui::EventHandler* event_handler_for_testing); | 95 void SetEventHandlerForTesting(ui::EventHandler* event_handler_for_testing); |
94 bool IsInNoFingersDownStateForTesting() const; | 96 bool IsInNoFingersDownStateForTesting() const; |
95 | 97 |
96 private: | 98 private: |
97 // Overridden from ui::EventRewriter | 99 // Overridden from ui::EventRewriter |
98 virtual ui::EventRewriteStatus RewriteEvent( | 100 virtual ui::EventRewriteStatus RewriteEvent( |
99 const ui::Event& event, | 101 const ui::Event& event, |
100 scoped_ptr<ui::Event>* rewritten_event) OVERRIDE; | 102 scoped_ptr<ui::Event>* rewritten_event) OVERRIDE; |
101 virtual ui::EventRewriteStatus NextDispatchEvent( | 103 virtual ui::EventRewriteStatus NextDispatchEvent( |
102 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE; | 104 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 // A default gesture detector config, so we can share the same | 245 // A default gesture detector config, so we can share the same |
244 // timeout and pixel slop constants. | 246 // timeout and pixel slop constants. |
245 ui::GestureDetector::Config gesture_detector_config_; | 247 ui::GestureDetector::Config gesture_detector_config_; |
246 | 248 |
247 // The previous state entered. | 249 // The previous state entered. |
248 State prev_state_; | 250 State prev_state_; |
249 | 251 |
250 // A copy of the previous event passed. | 252 // A copy of the previous event passed. |
251 scoped_ptr<ui::TouchEvent> prev_event_; | 253 scoped_ptr<ui::TouchEvent> prev_event_; |
252 | 254 |
255 // This toggles whether VLOGS are turned on or not. | |
256 bool VLOG_on_; | |
257 | |
253 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | 258 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
254 }; | 259 }; |
255 | 260 |
256 } // namespace ui | 261 } // namespace ui |
257 | 262 |
258 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 263 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
OLD | NEW |