| Index: mojo/services/public/cpp/view_manager/lib/view_manager.cc
 | 
| diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager.cc b/mojo/services/public/cpp/view_manager/lib/view_manager.cc
 | 
| index 7541d1a9d6f4a4737c0ee3e99b1c706ce7c60ec9..a090b7741ccafa63f20d78fceb38acc2761dd0be 100644
 | 
| --- a/mojo/services/public/cpp/view_manager/lib/view_manager.cc
 | 
| +++ b/mojo/services/public/cpp/view_manager/lib/view_manager.cc
 | 
| @@ -14,15 +14,6 @@
 | 
|  
 | 
|  namespace mojo {
 | 
|  namespace view_manager {
 | 
| -namespace {
 | 
| -
 | 
| -void OnViewManagerReady(base::RunLoop* loop,
 | 
| -                        ViewManager* manager,
 | 
| -                        ViewTreeNode* root) {
 | 
| -  loop->Quit();
 | 
| -}
 | 
| -
 | 
| -}  // namespace
 | 
|  
 | 
|  ////////////////////////////////////////////////////////////////////////////////
 | 
|  // ViewManager, public:
 | 
| @@ -45,22 +36,9 @@ ViewManager::~ViewManager() {
 | 
|  }
 | 
|  
 | 
|  // static
 | 
| -ViewManager* ViewManager::CreateBlocking(Application* application) {
 | 
| -  base::RunLoop init_loop;
 | 
| -  ViewManager* manager = new ViewManager(
 | 
| -      application,
 | 
| -      base::Bind(&OnViewManagerReady, &init_loop),
 | 
| -      RootCallback());
 | 
| -  init_loop.Run();
 | 
| -  return manager;
 | 
| -}
 | 
| -
 | 
| -// static
 | 
| -void ViewManager::Create(
 | 
| -    Application* application,
 | 
| -    const RootCallback& root_added_callback,
 | 
| -    const RootCallback& root_removed_callback) {
 | 
| -  new ViewManager(application, root_added_callback, root_removed_callback);
 | 
| +void ViewManager::Create(Application* application,
 | 
| +                         ViewManagerDelegate* delegate) {
 | 
| +  application->AddService<ViewManagerSynchronizer>(delegate);
 | 
|  }
 | 
|  
 | 
|  ViewTreeNode* ViewManager::GetNodeById(TransportNodeId id) {
 | 
| @@ -76,15 +54,10 @@ View* ViewManager::GetViewById(TransportViewId id) {
 | 
|  ////////////////////////////////////////////////////////////////////////////////
 | 
|  // ViewManager, private:
 | 
|  
 | 
| -ViewManager::ViewManager(
 | 
| -    Application* application,
 | 
| -    const RootCallback& root_added_callback,
 | 
| -    const RootCallback& root_removed_callback)
 | 
| -    : root_added_callback_(root_added_callback),
 | 
| -      root_removed_callback_(root_removed_callback),
 | 
| -      synchronizer_(NULL) {
 | 
| -  application->AddService<ViewManagerSynchronizer>(this);
 | 
| -}
 | 
| +ViewManager::ViewManager(ViewManagerSynchronizer* synchronizer,
 | 
| +                         ViewManagerDelegate* delegate)
 | 
| +    : delegate_(delegate),
 | 
| +      synchronizer_(synchronizer) {}
 | 
|  
 | 
|  }  // namespace view_manager
 | 
|  }  // namespace mojo
 | 
| 
 |