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 MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ |
7 | 7 |
8 #include "mojo/services/view_manager/view_manager_export.h" | 8 #include "mojo/services/view_manager/view_manager_export.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 class Event; | 11 class Event; |
sky
2014/08/15 18:03:56
You can remove this now.
| |
12 } | 12 } |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Rect; | 15 class Rect; |
16 } | 16 } |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace service { | 19 namespace service { |
20 | 20 |
21 class Node; | 21 class Node; |
22 | 22 |
23 class MOJO_VIEW_MANAGER_EXPORT NodeDelegate { | 23 class MOJO_VIEW_MANAGER_EXPORT NodeDelegate { |
24 public: | 24 public: |
25 // Invoked at the end of the Node's destructor (after it has been removed from | 25 // Invoked at the end of the Node's destructor (after it has been removed from |
26 // the hierarchy and its active view has been reset). | 26 // the hierarchy and its active view has been reset). |
27 virtual void OnNodeDestroyed(const Node* node) = 0; | 27 virtual void OnNodeDestroyed(const Node* node) = 0; |
28 | 28 |
29 // Invoked when the hierarchy has changed. | 29 // Invoked when the hierarchy has changed. |
30 virtual void OnNodeHierarchyChanged(const Node* node, | 30 virtual void OnNodeHierarchyChanged(const Node* node, |
31 const Node* new_parent, | 31 const Node* new_parent, |
32 const Node* old_parent) = 0; | 32 const Node* old_parent) = 0; |
33 | 33 |
34 virtual void OnNodeBoundsChanged(const Node* node, | 34 virtual void OnNodeBoundsChanged(const Node* node, |
35 const gfx::Rect& old_bounds, | 35 const gfx::Rect& old_bounds, |
36 const gfx::Rect& new_bounds) = 0; | 36 const gfx::Rect& new_bounds) = 0; |
37 | 37 |
38 // Invoked when an input event is received by a node. | |
39 virtual void OnNodeInputEvent(const Node* node, | |
40 const ui::Event* event) = 0; | |
41 | |
42 protected: | 38 protected: |
43 virtual ~NodeDelegate() {} | 39 virtual ~NodeDelegate() {} |
44 }; | 40 }; |
45 | 41 |
46 } // namespace service | 42 } // namespace service |
47 } // namespace mojo | 43 } // namespace mojo |
48 | 44 |
49 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ | 45 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_ |
OLD | NEW |