OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ | |
6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ | |
7 | |
8 namespace gfx { | |
9 class Rect; | |
10 } | |
11 | |
12 namespace mojo { | |
13 namespace service { | |
14 | |
15 class ServerView; | |
16 | |
17 class ServerViewDelegate { | |
18 public: | |
19 // Invoked when a view is about to be destroyed; before any of the children | |
20 // have been removed and before the view has been removed from its parent. | |
21 virtual void OnWillDestroyView(ServerView* view) = 0; | |
22 | |
23 // Invoked at the end of the View's destructor (after it has been removed from | |
24 // the hierarchy). | |
25 virtual void OnViewDestroyed(const ServerView* view) = 0; | |
26 | |
27 virtual void OnWillChangeViewHierarchy(ServerView* view, | |
28 ServerView* new_parent, | |
29 ServerView* old_parent) = 0; | |
30 | |
31 virtual void OnViewHierarchyChanged(const ServerView* view, | |
32 const ServerView* new_parent, | |
33 const ServerView* old_parent) = 0; | |
34 | |
35 virtual void OnViewBoundsChanged(const ServerView* view, | |
36 const gfx::Rect& old_bounds, | |
37 const gfx::Rect& new_bounds) = 0; | |
38 | |
39 virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0; | |
40 | |
41 virtual void OnViewReordered(const ServerView* view, | |
42 const ServerView* relative, | |
43 OrderDirection direction) = 0; | |
44 | |
45 virtual void OnWillChangeViewVisibility(ServerView* view) = 0; | |
46 | |
47 virtual void OnViewSharedPropertyChanged( | |
48 const ServerView* view, | |
49 const std::string& name, | |
50 const std::vector<uint8_t>* new_data) = 0; | |
51 | |
52 virtual void OnScheduleViewPaint(const ServerView* view) = 0; | |
53 | |
54 protected: | |
55 virtual ~ServerViewDelegate() {} | |
56 }; | |
57 | |
58 } // namespace service | |
59 } // namespace mojo | |
60 | |
61 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ | |
OLD | NEW |