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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 explicit TouchExplorationController( | 182 explicit TouchExplorationController( |
183 aura::Window* root_window, | 183 aura::Window* root_window, |
184 ui::TouchExplorationControllerDelegate* delegate); | 184 ui::TouchExplorationControllerDelegate* delegate); |
185 ~TouchExplorationController() override; | 185 ~TouchExplorationController() override; |
186 | 186 |
187 // Make synthesized touch events are anchored at this point. This is | 187 // Make synthesized touch events are anchored at this point. This is |
188 // called when the object with accessibility focus is updated via something | 188 // called when the object with accessibility focus is updated via something |
189 // other than touch exploration. | 189 // other than touch exploration. |
190 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); | 190 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); |
191 | 191 |
| 192 // Events within the exclude bounds will not be rewritten. |
| 193 // |bounds| are in root window coordinates. |
| 194 void SetExcludeBounds(const gfx::Rect& bounds); |
| 195 |
192 private: | 196 private: |
193 friend class TouchExplorationControllerTestApi; | 197 friend class TouchExplorationControllerTestApi; |
194 | 198 |
195 // Overridden from ui::EventRewriter | 199 // Overridden from ui::EventRewriter |
196 ui::EventRewriteStatus RewriteEvent( | 200 ui::EventRewriteStatus RewriteEvent( |
197 const ui::Event& event, | 201 const ui::Event& event, |
198 std::unique_ptr<ui::Event>* rewritten_event) override; | 202 std::unique_ptr<ui::Event>* rewritten_event) override; |
199 ui::EventRewriteStatus NextDispatchEvent( | 203 ui::EventRewriteStatus NextDispatchEvent( |
200 const ui::Event& last_event, | 204 const ui::Event& last_event, |
201 std::unique_ptr<ui::Event>* new_event) override; | 205 std::unique_ptr<ui::Event>* new_event) override; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 497 |
494 // The previous state entered. | 498 // The previous state entered. |
495 State prev_state_; | 499 State prev_state_; |
496 | 500 |
497 // A copy of the previous event passed. | 501 // A copy of the previous event passed. |
498 std::unique_ptr<ui::TouchEvent> prev_event_; | 502 std::unique_ptr<ui::TouchEvent> prev_event_; |
499 | 503 |
500 // This toggles whether VLOGS are turned on or not. | 504 // This toggles whether VLOGS are turned on or not. |
501 bool VLOG_on_; | 505 bool VLOG_on_; |
502 | 506 |
| 507 // LocatedEvents within this area should be left alone. |
| 508 gfx::Rect exclude_bounds_; |
| 509 |
503 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | 510 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
504 }; | 511 }; |
505 | 512 |
506 } // namespace ui | 513 } // namespace ui |
507 | 514 |
508 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 515 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
OLD | NEW |