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

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

Issue 303163005: Embedding demo in View manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | « 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: 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 8380581b8a40385e2515fe235544a4765c318488..edfe2c1a0e1ff548968bdff77a526a45ff5843f4 100644
--- a/mojo/services/public/cpp/view_manager/view_manager.h
+++ b/mojo/services/public/cpp/view_manager/view_manager.h
@@ -13,7 +13,7 @@
#include "mojo/services/public/cpp/view_manager/view_tree_node.h"
namespace mojo {
-class ServiceProvider;
+class Application;
namespace view_manager {
class View;
@@ -21,17 +21,12 @@ class ViewManagerSynchronizer;
class ViewTreeNode;
// Approximately encapsulates the View Manager service.
-// Owns a synchronizer that keeps a client model in sync with the service.
-// Owned by the creator.
+// Has a synchronizer that keeps a client model in sync with the service.
+// Owned by the connection.
//
// 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,
@@ -39,20 +34,22 @@ class ViewManager {
// 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.
- void Init();
+ explicit ViewManager(Application* application);
+ ~ViewManager();
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;
- ServiceProvider* service_provider_;
- scoped_ptr<ViewManagerSynchronizer> synchronizer_;
+ ViewManagerSynchronizer* synchronizer_;
ViewTreeNode* tree_;
IdToNodeMap nodes_;
« no previous file with comments | « 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