| Index: mojo/services/view_manager/server_view_delegate.h
|
| diff --git a/mojo/services/view_manager/server_view_delegate.h b/mojo/services/view_manager/server_view_delegate.h
|
| index beca8d2d3e901f6748c1345944961aaea95eb645..2f9a52bc74a73e3edaf06a3ee6b7b157e6b3ac53 100644
|
| --- a/mojo/services/view_manager/server_view_delegate.h
|
| +++ b/mojo/services/view_manager/server_view_delegate.h
|
| @@ -19,40 +19,23 @@ namespace view_manager {
|
|
|
| class ServerView;
|
|
|
| +// ServerViewDelegate is notified at key points in the lifetime of a
|
| +// ServerView. Some of the functions are similar to that of
|
| +// ServerViewObserver. For example, ServerViewDelegate::PrepareToDestroyView()
|
| +// and ServerViewObserver::OnWillDestroyView(). The key difference between
|
| +// the two are the ServerViewDelegate ones are always notified first, and
|
| +// ServerViewDelegate gets non-const arguments.
|
| class ServerViewDelegate {
|
| public:
|
| // Invoked when a view is about to be destroyed; before any of the children
|
| // have been removed and before the view has been removed from its parent.
|
| - virtual void OnWillDestroyView(ServerView* view) = 0;
|
| + virtual void PrepareToDestroyView(ServerView* view) = 0;
|
|
|
| - // Invoked at the end of the View's destructor (after it has been removed from
|
| - // the hierarchy).
|
| - virtual void OnViewDestroyed(const ServerView* view) = 0;
|
| + virtual void PrepareToChangeViewHierarchy(ServerView* view,
|
| + ServerView* new_parent,
|
| + ServerView* old_parent) = 0;
|
|
|
| - virtual void OnWillChangeViewHierarchy(ServerView* view,
|
| - ServerView* new_parent,
|
| - ServerView* old_parent) = 0;
|
| -
|
| - virtual void OnViewHierarchyChanged(const ServerView* view,
|
| - const ServerView* new_parent,
|
| - const ServerView* old_parent) = 0;
|
| -
|
| - virtual void OnViewBoundsChanged(const ServerView* view,
|
| - const gfx::Rect& old_bounds,
|
| - const gfx::Rect& new_bounds) = 0;
|
| -
|
| - virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0;
|
| -
|
| - virtual void OnViewReordered(const ServerView* view,
|
| - const ServerView* relative,
|
| - mojo::OrderDirection direction) = 0;
|
| -
|
| - virtual void OnWillChangeViewVisibility(ServerView* view) = 0;
|
| -
|
| - virtual void OnViewSharedPropertyChanged(
|
| - const ServerView* view,
|
| - const std::string& name,
|
| - const std::vector<uint8_t>* new_data) = 0;
|
| + virtual void PrepareToChangeViewVisibility(ServerView* view) = 0;
|
|
|
| virtual void OnScheduleViewPaint(const ServerView* view) = 0;
|
|
|
|
|