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

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

Issue 306403003: Revert 274322 "Implement a demo that shows one app embedding ren..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/mojo/services/public/cpp/view_manager/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/mojo/services/public/cpp/view_manager/view_manager.h
===================================================================
--- trunk/src/mojo/services/public/cpp/view_manager/view_manager.h (revision 274327)
+++ trunk/src/mojo/services/public/cpp/view_manager/view_manager.h (working copy)
@@ -13,7 +13,7 @@
#include "mojo/services/public/cpp/view_manager/view_tree_node.h"
namespace mojo {
-class Application;
+class ServiceProvider;
namespace view_manager {
class View;
@@ -21,12 +21,17 @@
class ViewTreeNode;
// Approximately encapsulates the View Manager service.
-// Has a synchronizer that keeps a client model in sync with the service.
-// Owned by the connection.
+// Owns a synchronizer that keeps a client model in sync with the service.
+// Owned by the creator.
//
// TODO: displays
class ViewManager {
public:
+ explicit ViewManager(ServiceProvider* service_provider);
+ ~ViewManager();
+
+ // Connects to the View Manager service. This method must be called before
+ // using any other View Manager lib class or function.
// Blocks on establishing the connection and subsequently receiving a node
// tree from the service.
// TODO(beng): blocking is currently achieved by running a nested runloop,
@@ -34,22 +39,20 @@
// we should instead wait on the client pipe receiving a
// connection established message.
// TODO(beng): this method could optionally not block if supplied a callback.
- explicit ViewManager(Application* application);
- ~ViewManager();
+ void Init();
ViewTreeNode* tree() { return tree_; }
ViewTreeNode* GetNodeById(TransportNodeId id);
View* GetViewById(TransportViewId id);
- void Embed(const String& url, ViewTreeNode* node);
-
private:
friend class ViewManagerPrivate;
typedef std::map<TransportNodeId, ViewTreeNode*> IdToNodeMap;
typedef std::map<TransportViewId, View*> IdToViewMap;
- ViewManagerSynchronizer* synchronizer_;
+ ServiceProvider* service_provider_;
+ scoped_ptr<ViewManagerSynchronizer> synchronizer_;
ViewTreeNode* tree_;
IdToNodeMap nodes_;
« no previous file with comments | « trunk/src/mojo/services/public/cpp/view_manager/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698