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_SERVER_VIEW_DELEGATE_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_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 gfx { | 10 namespace gfx { |
11 class Rect; | 11 class Rect; |
12 } | 12 } |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace service { | 15 namespace service { |
16 | 16 |
17 class ServerView; | 17 class ServerView; |
18 | 18 |
19 class MOJO_VIEW_MANAGER_EXPORT ServerViewDelegate { | 19 class MOJO_VIEW_MANAGER_EXPORT ServerViewDelegate { |
20 public: | 20 public: |
21 // Invoked at the end of the View's destructor (after it has been removed from | 21 // Invoked at the end of the View's destructor (after it has been removed from |
22 // the hierarchy). | 22 // the hierarchy). |
23 virtual void OnViewDestroyed(const ServerView* view) = 0; | 23 virtual void OnViewDestroyed(const ServerView* view) = 0; |
24 | 24 |
25 // Invoked when the hierarchy has changed. | 25 virtual void OnWillChangeViewHierarchy(const ServerView* view, |
| 26 const ServerView* new_parent, |
| 27 const ServerView* old_parent) = 0; |
| 28 |
26 virtual void OnViewHierarchyChanged(const ServerView* view, | 29 virtual void OnViewHierarchyChanged(const ServerView* view, |
27 const ServerView* new_parent, | 30 const ServerView* new_parent, |
28 const ServerView* old_parent) = 0; | 31 const ServerView* old_parent) = 0; |
29 | 32 |
30 virtual void OnViewBoundsChanged(const ServerView* view, | 33 virtual void OnViewBoundsChanged(const ServerView* view, |
31 const gfx::Rect& old_bounds, | 34 const gfx::Rect& old_bounds, |
32 const gfx::Rect& new_bounds) = 0; | 35 const gfx::Rect& new_bounds) = 0; |
33 | 36 |
34 virtual void OnViewBitmapChanged(const ServerView* view) = 0; | 37 virtual void OnViewBitmapChanged(const ServerView* view) = 0; |
35 | 38 |
| 39 virtual void OnWillChangeViewVisibility(const ServerView* view) = 0; |
| 40 |
36 protected: | 41 protected: |
37 virtual ~ServerViewDelegate() {} | 42 virtual ~ServerViewDelegate() {} |
38 }; | 43 }; |
39 | 44 |
40 } // namespace service | 45 } // namespace service |
41 } // namespace mojo | 46 } // namespace mojo |
42 | 47 |
43 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ | 48 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ |
OLD | NEW |