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

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

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
Index: trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager.cc
===================================================================
--- trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager.cc (revision 274327)
+++ trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager.cc (working copy)
@@ -4,8 +4,6 @@
#include "mojo/services/public/cpp/view_manager/view_manager.h"
-#include "base/message_loop/message_loop.h"
-#include "mojo/public/cpp/application/application.h"
#include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h"
#include "mojo/services/public/cpp/view_manager/lib/view_tree_node_private.h"
#include "mojo/services/public/cpp/view_manager/view.h"
@@ -13,13 +11,8 @@
namespace mojo {
namespace view_manager {
-ViewManager::ViewManager(Application* application)
- : synchronizer_(NULL),
- tree_(NULL) {
- application->AddService<ViewManagerSynchronizer>(this);
- // Block in a nested message loop until the ViewManagerSynchronizer is set up.
- base::MessageLoop::current()->Run();
-}
+ViewManager::ViewManager(ServiceProvider* service_provider)
+ : service_provider_(service_provider) {}
ViewManager::~ViewManager() {
while (!nodes_.empty()) {
@@ -38,6 +31,10 @@
}
}
+void ViewManager::Init() {
+ synchronizer_.reset(new ViewManagerSynchronizer(this));
+}
+
ViewTreeNode* ViewManager::GetNodeById(TransportNodeId id) {
IdToNodeMap::const_iterator it = nodes_.find(id);
return it != nodes_.end() ? it->second : NULL;
@@ -48,9 +45,5 @@
return it != views_.end() ? it->second : NULL;
}
-void ViewManager::Embed(const String& url, ViewTreeNode* node) {
- synchronizer_->Embed(url, node->id());
-}
-
} // namespace view_manager
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698