OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_ |
| 6 #define UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "ui/aura/aura_export.h" |
| 12 |
| 13 namespace gfx { |
| 14 class Point; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 class MouseEvent; |
| 19 class TouchEvent; |
| 20 } |
| 21 |
| 22 namespace aura { |
| 23 |
| 24 class Window; |
| 25 |
| 26 class AURA_EXPORT EnvInputStateController { |
| 27 public: |
| 28 EnvInputStateController() : touch_ids_down_(0) {} |
| 29 ~EnvInputStateController() {} |
| 30 |
| 31 void UpdateStateForMouseEvent(const Window* window, ui::MouseEvent* event) |
| 32 const; |
| 33 void UpdateStateForTouchEvent(ui::TouchEvent* event); |
| 34 void SetLastMouseLocation(const Window* root_window, |
| 35 const gfx::Point& location_in_root) const; |
| 36 |
| 37 private: |
| 38 // Touch ids that are currently down. |
| 39 uint32_t touch_ids_down_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(EnvInputStateController); |
| 42 }; |
| 43 |
| 44 } // namespace aura |
| 45 |
| 46 #endif // UI_AURA_ENV_INPUT_STATE_CONTROLLER_H_ |
OLD | NEW |