| 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_VIEW_TREE_NODE_OBSERVER_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_OBSERVER_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_OBSERVER_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_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 namespace gfx { |
| 13 class Rect; |
| 14 } |
| 15 |
| 12 namespace mojo { | 16 namespace mojo { |
| 13 namespace view_manager { | 17 namespace view_manager { |
| 14 | 18 |
| 15 class View; | 19 class View; |
| 16 class ViewTreeNode; | 20 class ViewTreeNode; |
| 17 | 21 |
| 18 class ViewTreeNodeObserver { | 22 class ViewTreeNodeObserver { |
| 19 public: | 23 public: |
| 20 enum DispositionChangePhase { | 24 enum DispositionChangePhase { |
| 21 DISPOSITION_CHANGING, | 25 DISPOSITION_CHANGING, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 virtual void OnTreeChange(const TreeChangeParams& params) {} | 38 virtual void OnTreeChange(const TreeChangeParams& params) {} |
| 35 | 39 |
| 36 virtual void OnNodeDestroy(ViewTreeNode* node, | 40 virtual void OnNodeDestroy(ViewTreeNode* node, |
| 37 DispositionChangePhase phase) {} | 41 DispositionChangePhase phase) {} |
| 38 | 42 |
| 39 virtual void OnNodeActiveViewChange(ViewTreeNode* node, | 43 virtual void OnNodeActiveViewChange(ViewTreeNode* node, |
| 40 View* old_view, | 44 View* old_view, |
| 41 View* new_view, | 45 View* new_view, |
| 42 DispositionChangePhase phase) {} | 46 DispositionChangePhase phase) {} |
| 43 | 47 |
| 48 virtual void OnNodeBoundsChange(ViewTreeNode* node, |
| 49 const gfx::Rect& old_bounds, |
| 50 const gfx::Rect& new_bounds, |
| 51 DispositionChangePhase phase) {} |
| 52 |
| 44 protected: | 53 protected: |
| 45 virtual ~ViewTreeNodeObserver() {} | 54 virtual ~ViewTreeNodeObserver() {} |
| 46 }; | 55 }; |
| 47 | 56 |
| 48 } // namespace view_manager | 57 } // namespace view_manager |
| 49 } // namespace mojo | 58 } // namespace mojo |
| 50 | 59 |
| 51 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_OBSERVER_H_ | 60 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_OBSERVER_H_ |
| OLD | NEW |