| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ |
| 6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ | 6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ |
| 7 | 7 |
| 8 namespace view_manager { | 8 namespace view_manager { |
| 9 | 9 |
| 10 class ViewManagerServiceImpl; | 10 class ViewTreeImpl; |
| 11 | 11 |
| 12 // A ViewManagerRootDelegate interface is implemented by an object that | 12 // A ViewManagerRootDelegate interface is implemented by an object that |
| 13 // has the ViewManagerServiceImpl that is associated with the | 13 // has the ViewManagerServiceImpl that is associated with the |
| 14 // ViewManagerRootImpl that holds a pointer to this object. Typically, a | 14 // ViewManagerRootImpl that holds a pointer to this object. Typically, a |
| 15 // ViewManagerRootDelegate will also manage the lifetime of the | 15 // ViewManagerRootDelegate will also manage the lifetime of the |
| 16 // ViewManagerRootImpl and will delete the object when it gets informed of | 16 // ViewManagerRootImpl and will delete the object when it gets informed of |
| 17 // when the Display of the root is closed. | 17 // when the Display of the root is closed. |
| 18 class ViewManagerRootDelegate { | 18 class ViewManagerRootDelegate { |
| 19 public: | 19 public: |
| 20 // Called when the window associated with the root is completely initialized | 20 // Called when the window associated with the root is completely initialized |
| 21 // (i.e. the ViewportMetrics for the display is known). | 21 // (i.e. the ViewportMetrics for the display is known). |
| 22 virtual void OnDisplayInitialized() = 0; | 22 virtual void OnDisplayInitialized() = 0; |
| 23 | 23 |
| 24 // Called when the window associated with the root is closed. | 24 // Called when the window associated with the root is closed. |
| 25 virtual void OnDisplayClosed() = 0; | 25 virtual void OnDisplayClosed() = 0; |
| 26 | 26 |
| 27 // Returns the ViewManagerServiceImpl associated with the delegate. | 27 // Returns the ViewTreeImpl associated with the delegate. |
| 28 virtual ViewManagerServiceImpl* GetViewManagerService() = 0; | 28 virtual ViewTreeImpl* GetViewTree() = 0; |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 virtual ~ViewManagerRootDelegate() {} | 31 virtual ~ViewManagerRootDelegate() {} |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace view_manager | 34 } // namespace view_manager |
| 35 | 35 |
| 36 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ | 36 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_ |
| OLD | NEW |