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

Unified Diff: mojo/services/public/cpp/view_manager/view_manager.h

Issue 260863008: Add support for mapping node tree on the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
Index: mojo/services/public/cpp/view_manager/view_manager.h
diff --git a/mojo/services/public/cpp/view_manager/view_manager.h b/mojo/services/public/cpp/view_manager/view_manager.h
index fb492ec50663928b65ede76d989cea61144d39c4..46ad1b6a65f7f14854dfbc7252aca83b3c242d7a 100644
--- a/mojo/services/public/cpp/view_manager/view_manager.h
+++ b/mojo/services/public/cpp/view_manager/view_manager.h
@@ -7,13 +7,18 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
+#include "mojo/public/cpp/bindings/callback.h"
+#include "mojo/services/public/cpp/view_manager/view_tree_node.h"
namespace mojo {
class Shell;
namespace services {
namespace view_manager {
+class ViewManagerObserver;
class ViewManagerSynchronizer;
+class ViewTreeNode;
// Approximately encapsulates the View Manager service.
// Owns a synchronizer that keeps a client model in sync with the service.
@@ -25,11 +30,21 @@ class ViewManager {
explicit ViewManager(Shell* shell);
~ViewManager();
+ void BuildNodeTree(const mojo::Callback<void()>& callback);
+
+ ViewTreeNode* tree() { return tree_.get(); }
+
private:
friend class ViewManagerPrivate;
+ void AddObserver(ViewManagerObserver* observer);
+ void RemoveObserver(ViewManagerObserver* observer);
+
Shell* shell_;
scoped_ptr<ViewManagerSynchronizer> synchronizer_;
+ scoped_ptr<ViewTreeNode> tree_;
+
+ ObserverList<ViewManagerObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(ViewManager);
};

Powered by Google App Engine
This is Rietveld 408576698