| 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_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 #include "mojo/services/public/cpp/view_manager/node.h" | 12 #include "mojo/services/public/cpp/view_manager/node.h" |
| 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 view_manager { | |
| 20 | 19 |
| 21 class Node; | 20 class Node; |
| 22 class View; | 21 class View; |
| 23 | 22 |
| 24 // A note on -ing and -ed suffixes: | 23 // A note on -ing and -ed suffixes: |
| 25 // | 24 // |
| 26 // -ing methods are called before changes are applied to the local node model. | 25 // -ing methods are called before changes are applied to the local node model. |
| 27 // -ed methods are called after changes are applied to the local node model. | 26 // -ed methods are called after changes are applied to the local node model. |
| 28 // | 27 // |
| 29 // If the change originated from another connection to the view manager, it's | 28 // If the change originated from another connection to the view manager, it's |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 virtual void OnNodeBoundsChanged(Node* node, | 66 virtual void OnNodeBoundsChanged(Node* node, |
| 68 const gfx::Rect& old_bounds, | 67 const gfx::Rect& old_bounds, |
| 69 const gfx::Rect& new_bounds) {} | 68 const gfx::Rect& new_bounds) {} |
| 70 | 69 |
| 71 virtual void OnNodeFocusChanged(Node* gained_focus, Node* lost_focus) {} | 70 virtual void OnNodeFocusChanged(Node* gained_focus, Node* lost_focus) {} |
| 72 | 71 |
| 73 protected: | 72 protected: |
| 74 virtual ~NodeObserver() {} | 73 virtual ~NodeObserver() {} |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace view_manager | |
| 78 } // namespace mojo | 76 } // namespace mojo |
| 79 | 77 |
| 80 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ | 78 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_ |
| OLD | NEW |