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 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 class Point; | 11 class Point; |
12 class Rect; | 12 class Rect; |
13 class Size; | 13 class Size; |
14 } | 14 } |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 class Event; | 17 class Event; |
18 class KeyEvent; | 18 class KeyEvent; |
19 class MouseEvent; | 19 class MouseEvent; |
20 class ScrollEvent; | 20 class ScrollEvent; |
21 class TouchEvent; | 21 class TouchEvent; |
22 } | 22 } |
23 | 23 |
24 namespace aura { | 24 namespace aura { |
25 | 25 |
26 class RootWindow; | 26 class RootWindow; |
27 | 27 |
28 // A private interface used by WindowTreeHost implementations to communicate | 28 // A private interface used by RootWindowHost implementations to communicate |
29 // with their owning RootWindow. | 29 // with their owning RootWindow. |
30 class AURA_EXPORT WindowTreeHostDelegate { | 30 class AURA_EXPORT RootWindowHostDelegate { |
31 public: | 31 public: |
32 virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0; | 32 virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0; |
33 virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0; | 33 virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0; |
34 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) = 0; | 34 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) = 0; |
35 virtual bool OnHostTouchEvent(ui::TouchEvent* event) = 0; | 35 virtual bool OnHostTouchEvent(ui::TouchEvent* event) = 0; |
36 virtual void OnHostCancelMode() = 0; | 36 virtual void OnHostCancelMode() = 0; |
37 | 37 |
38 // Called when the windowing system activates the window. | 38 // Called when the windowing system activates the window. |
39 virtual void OnHostActivated() = 0; | 39 virtual void OnHostActivated() = 0; |
40 | 40 |
41 // Called when system focus is changed to another window. | 41 // Called when system focus is changed to another window. |
42 virtual void OnHostLostWindowCapture() = 0; | 42 virtual void OnHostLostWindowCapture() = 0; |
43 | 43 |
44 // Called when the windowing system has mouse grab because it's performing a | 44 // Called when the windowing system has mouse grab because it's performing a |
45 // window move on our behalf, but we should still paint as if we're active. | 45 // window move on our behalf, but we should still paint as if we're active. |
46 virtual void OnHostLostMouseGrab() = 0; | 46 virtual void OnHostLostMouseGrab() = 0; |
47 | 47 |
48 virtual void OnHostMoved(const gfx::Point& origin) = 0; | 48 virtual void OnHostMoved(const gfx::Point& origin) = 0; |
49 virtual void OnHostResized(const gfx::Size& size) = 0; | 49 virtual void OnHostResized(const gfx::Size& size) = 0; |
50 | 50 |
51 virtual RootWindow* AsRootWindow() = 0; | 51 virtual RootWindow* AsRootWindow() = 0; |
52 virtual const RootWindow* AsRootWindow() const = 0; | 52 virtual const RootWindow* AsRootWindow() const = 0; |
53 | 53 |
54 protected: | 54 protected: |
55 virtual ~WindowTreeHostDelegate() {} | 55 virtual ~RootWindowHostDelegate() {} |
56 }; | 56 }; |
57 | 57 |
58 } // namespace aura | 58 } // namespace aura |
59 | 59 |
60 #endif // UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ | 60 #endif // UI_AURA_ROOT_WINDOW_HOST_DELEGATE_H_ |
OLD | NEW |