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

Side by Side Diff: components/view_manager/public/cpp/lib/view_manager_init.cc

Issue 1254383016: ApplicationConnection lifetime management changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/html_viewer/html_document_application_delegate.cc ('k') | components/view_manager/public/cpp/view_manager_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698