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

Unified Diff: services/view_manager/server_view_delegate.h

Issue 1536713004: Revert "Delete the ViewManager and WindowManager services." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « services/view_manager/server_view.cc ('k') | 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: services/view_manager/server_view_delegate.h
diff --git a/services/view_manager/server_view_delegate.h b/services/view_manager/server_view_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..0a3e3ee633e7a0105cd02498aa0c885d14f13265
--- /dev/null
+++ b/services/view_manager/server_view_delegate.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
+#define SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
+
+#include "mojo/services/view_manager/interfaces/view_manager_constants.mojom.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace mojo {
+class ViewportMetrics;
+}
+
+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 PrepareToDestroyView(ServerView* view) = 0;
+
+ virtual void PrepareToChangeViewHierarchy(ServerView* view,
+ ServerView* new_parent,
+ ServerView* old_parent) = 0;
+
+ virtual void PrepareToChangeViewVisibility(ServerView* view) = 0;
+
+ virtual void OnScheduleViewPaint(const ServerView* view) = 0;
+
+ protected:
+ virtual ~ServerViewDelegate() {}
+};
+
+} // namespace view_manager
+
+#endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
« no previous file with comments | « services/view_manager/server_view.cc ('k') | services/view_manager/server_view_drawn_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698