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

Side by Side Diff: content/child/navigator_connect/service_port_provider.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/navigator_connect/service_port_provider.h" 5 #include "content/child/navigator_connect/service_port_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 ServicePortServicePtr& ServicePortProvider::GetServicePortServicePtr() { 119 ServicePortServicePtr& ServicePortProvider::GetServicePortServicePtr() {
120 if (!service_port_service_.get()) { 120 if (!service_port_service_.get()) {
121 mojo::InterfaceRequest<ServicePortService> request = 121 mojo::InterfaceRequest<ServicePortService> request =
122 mojo::GetProxy(&service_port_service_); 122 mojo::GetProxy(&service_port_service_);
123 main_loop_->PostTask(FROM_HERE, base::Bind(&ConnectToServiceOnMainThread, 123 main_loop_->PostTask(FROM_HERE, base::Bind(&ConnectToServiceOnMainThread,
124 base::Passed(&request))); 124 base::Passed(&request)));
125 125
126 // Setup channel for browser to post events back to this class. 126 // Setup channel for browser to post events back to this class.
127 ServicePortServiceClientPtr client_ptr; 127 service_port_service_->SetClient(binding_.CreateInterfacePtrAndBind());
128 binding_.Bind(GetProxy(&client_ptr));
129 service_port_service_->SetClient(std::move(client_ptr));
130 } 128 }
131 return service_port_service_; 129 return service_port_service_;
132 } 130 }
133 131
134 } // namespace content 132 } // namespace content
OLDNEW
« no previous file with comments | « components/web_view/public/cpp/web_view.cc ('k') | content/renderer/presentation/presentation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698