Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 #ifndef ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_ | |
| 6 #define ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ash/display/display_controller.h" | |
| 10 #include "base/values.h" | |
| 11 #include "ui/aura/window.h" | |
| 12 #include "ui/events/event.h" | |
| 13 #include "ui/events/event_handler.h" | |
| 14 | |
| 15 namespace ash { | |
| 16 namespace internal { | |
| 17 | |
| 18 // TODO: How much screen/display logic (DisplayController::Observer, | |
|
mfomitchev
2014/04/11 21:00:58
Bunch of questions in TODOs here.
sadrul
2014/04/14 20:22:11
Unsure. oshima@/dnicoara@ would have good answers.
| |
| 19 // gfx::DisplayObserver, etc) do we need here? This is managed from | |
| 20 // RootWindowCOntroller | |
| 21 // TODO: Maybe implement gfx::DisplayObserver | |
| 22 // TODO: Do we need to inherit from OutputConfigurator::Observer to react to | |
| 23 // OnDisplayModeChanged()? | |
| 24 class ASH_EXPORT TouchExplorationController : | |
| 25 public ui::EventHandler, | |
| 26 public DisplayController::Observer { | |
| 27 public: | |
| 28 | |
| 29 explicit TouchExplorationController(aura::Window* root_window); | |
| 30 virtual ~TouchExplorationController(); | |
| 31 | |
| 32 private: | |
| 33 // Overriden from ui::EventHandler. | |
| 34 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | |
| 35 | |
| 36 // Overriden form DisplayController::Observer. | |
| 37 virtual void OnDisplaysInitialized() OVERRIDE; | |
| 38 virtual void OnDisplayConfigurationChanging() OVERRIDE; | |
| 39 virtual void OnDisplayConfigurationChanged() OVERRIDE; | |
| 40 | |
| 41 void GenerateMouseEvent( | |
| 42 ui::EventType event_type, gfx::Point location, int flags); | |
| 43 | |
| 44 std::vector<int> touch_ids_; | |
| 45 // map of touch ids to their last know locations | |
| 46 std::map<int, gfx::Point> touch_locations_; | |
| 47 | |
| 48 const int64 display_id_; | |
| 49 aura::Window* root_window_; | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | |
| 52 }; | |
| 53 | |
| 54 } // namespace internal | |
| 55 } // namespace ash | |
| 56 | |
| 57 #endif // ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_ | |
| OLD | NEW |