Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1088)

Unified Diff: mojo/services/view_manager/server_view_delegate.h

Issue 1092033003: Pulls display related changes from mojo to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/view_manager/server_view.cc ('k') | mojo/services/view_manager/server_view_drawn_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « mojo/services/view_manager/server_view.cc ('k') | mojo/services/view_manager/server_view_drawn_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698