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

Unified Diff: services/view_manager/server_view.h

Issue 1082943002: Adds a ServerViewObserver interface (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: grammar 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 | « services/view_manager/connection_manager.cc ('k') | services/view_manager/server_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/view_manager/server_view.h
diff --git a/services/view_manager/server_view.h b/services/view_manager/server_view.h
index 03842e7bb5cfc0a3db9231bf362fd22fafb14f9a..f0050a42620023166978eb8e8fe66e1190c44c48 100644
--- a/services/view_manager/server_view.h
+++ b/services/view_manager/server_view.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/logging.h"
+#include "base/observer_list.h"
#include "cc/surfaces/surface_id.h"
#include "mojo/services/view_manager/public/interfaces/view_manager.mojom.h"
#include "services/view_manager/ids.h"
@@ -17,6 +18,7 @@
namespace view_manager {
class ServerViewDelegate;
+class ServerViewObserver;
// Server side representation of a view. Delegate is informed of interesting
// events.
@@ -29,6 +31,9 @@ class ServerView {
ServerView(ServerViewDelegate* delegate, const ViewId& id);
virtual ~ServerView();
+ void AddObserver(ServerViewObserver* observer);
+ void RemoveObserver(ServerViewObserver* observer);
+
const ViewId& id() const { return id_; }
void Add(ServerView* child);
@@ -101,6 +106,8 @@ class ServerView {
std::map<std::string, std::vector<uint8_t>> properties_;
+ ObserverList<ServerViewObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(ServerView);
};
« no previous file with comments | « services/view_manager/connection_manager.cc ('k') | services/view_manager/server_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698