OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ |
6 #define UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ |
7 | 7 |
8 namespace gfx { | 8 namespace gfx { |
| 9 class Point; |
9 class Size; | 10 class Size; |
10 } | 11 } |
11 | 12 |
12 namespace ui { | 13 namespace ui { |
13 class KeyEvent; | 14 class KeyEvent; |
14 class MouseEvent; | 15 class MouseEvent; |
15 class ScrollEvent; | 16 class ScrollEvent; |
16 class TouchEvent; | 17 class TouchEvent; |
17 } | 18 } |
18 | 19 |
19 namespace aura { | 20 namespace aura { |
20 | 21 |
21 class RootWindow; | 22 class RootWindow; |
22 | 23 |
23 // A private interface used by RootWindowHost implementations to communicate | 24 // A private interface used by RootWindowHost implementations to communicate |
24 // with their owning RootWindow. | 25 // with their owning RootWindow. |
25 class AURA_EXPORT RootWindowHostDelegate { | 26 class AURA_EXPORT RootWindowHostDelegate { |
26 public: | 27 public: |
27 virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0; | 28 virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0; |
28 virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0; | 29 virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0; |
29 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) = 0; | 30 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) = 0; |
30 virtual bool OnHostTouchEvent(ui::TouchEvent* event) = 0; | 31 virtual bool OnHostTouchEvent(ui::TouchEvent* event) = 0; |
31 | 32 |
32 virtual void OnHostLostCapture() = 0; | 33 virtual void OnHostLostCapture() = 0; |
33 | 34 |
34 virtual void OnHostPaint() = 0; | 35 virtual void OnHostPaint() = 0; |
35 | 36 |
| 37 virtual void OnHostMoved(const gfx::Point& origin) = 0; |
36 virtual void OnHostResized(const gfx::Size& size) = 0; | 38 virtual void OnHostResized(const gfx::Size& size) = 0; |
37 | 39 |
38 virtual float GetDeviceScaleFactor() = 0; | 40 virtual float GetDeviceScaleFactor() = 0; |
39 | 41 |
40 virtual RootWindow* AsRootWindow() = 0; | 42 virtual RootWindow* AsRootWindow() = 0; |
41 | 43 |
42 protected: | 44 protected: |
43 virtual ~RootWindowHostDelegate() {} | 45 virtual ~RootWindowHostDelegate() {} |
44 }; | 46 }; |
45 | 47 |
46 } // namespace aura | 48 } // namespace aura |
47 | 49 |
48 #endif // UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ | 50 #endif // UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ |
OLD | NEW |