| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/view_manager/public/cpp/view_manager_init.h" | 5 #include "components/view_manager/public/cpp/view_manager_init.h" |
| 6 | 6 |
| 7 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" | 7 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" |
| 8 #include "components/view_manager/public/cpp/view_manager_delegate.h" | 8 #include "components/view_manager/public/cpp/view_manager_delegate.h" |
| 9 #include "mojo/application/public/cpp/application_impl.h" | 9 #include "mojo/application/public/cpp/application_impl.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 connection_->ConnectToService(&view_manager_root_); | 45 connection_->ConnectToService(&view_manager_root_); |
| 46 | 46 |
| 47 if (root_client) { | 47 if (root_client) { |
| 48 root_client_binding_.reset(new Binding<ViewManagerRootClient>(root_client)); | 48 root_client_binding_.reset(new Binding<ViewManagerRootClient>(root_client)); |
| 49 ViewManagerRootClientPtr root_client_ptr; | 49 ViewManagerRootClientPtr root_client_ptr; |
| 50 root_client_binding_->Bind(GetProxy(&root_client_ptr)); | 50 root_client_binding_->Bind(GetProxy(&root_client_ptr)); |
| 51 view_manager_root_->SetViewManagerRootClient(root_client_ptr.Pass()); | 51 view_manager_root_->SetViewManagerRootClient(root_client_ptr.Pass()); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 ViewManagerInit::~ViewManagerInit() { | 55 ViewManagerInit::~ViewManagerInit() {} |
| 56 connection_->CloseConnection(); | |
| 57 } | |
| 58 | 56 |
| 59 void ViewManagerInit::OnCreate(InterfaceRequest<ViewManagerClient> request) { | 57 void ViewManagerInit::OnCreate(InterfaceRequest<ViewManagerClient> request) { |
| 60 // TODO(sky): straighten out lifetime. | 58 // TODO(sky): straighten out lifetime. |
| 61 new ViewManagerClientImpl(delegate_, app_->shell(), request.Pass()); | 59 new ViewManagerClientImpl(delegate_, app_->shell(), request.Pass()); |
| 62 } | 60 } |
| 63 | 61 |
| 64 } // namespace mojo | 62 } // namespace mojo |
| OLD | NEW |