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

Unified Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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
« no previous file with comments | « mojo/public/cpp/application/connect.h ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/application/lib/application_impl.cc
diff --git a/mojo/public/cpp/application/lib/application_impl.cc b/mojo/public/cpp/application/lib/application_impl.cc
index 569bca0c38a4adec497cfcf96f4baea2d7ebc48f..1bdbf6b19031462c39c0e6034d96bdea7cb1f522 100644
--- a/mojo/public/cpp/application/lib/application_impl.cc
+++ b/mojo/public/cpp/application/lib/application_impl.cc
@@ -37,11 +37,11 @@ ApplicationImpl::CreateApplicationConnector() {
ApplicationConnection* ApplicationImpl::ConnectToApplication(
const String& application_url) {
MOJO_CHECK(shell_);
- ServiceProviderPtr local_services;
+ InterfaceHandle<ServiceProvider> local_services;
InterfaceRequest<ServiceProvider> local_request = GetProxy(&local_services);
ServiceProviderPtr remote_services;
shell_->ConnectToApplication(application_url, GetProxy(&remote_services),
- local_services.Pass());
+ std::move(local_services));
internal::ServiceRegistry* registry = new internal::ServiceRegistry(
this, application_url, application_url, remote_services.Pass(),
local_request.Pass());
@@ -61,10 +61,10 @@ void ApplicationImpl::UnbindConnections(
shell->Bind(shell_.PassInterfaceHandle());
}
-void ApplicationImpl::Initialize(ShellPtr shell,
+void ApplicationImpl::Initialize(InterfaceHandle<Shell> shell,
Array<String> args,
const mojo::String& url) {
- shell_ = shell.Pass();
+ shell_ = ShellPtr::Create(std::move(shell));
shell_.set_connection_error_handler([this]() {
delegate_->Quit();
incoming_service_registries_.clear();
@@ -79,11 +79,12 @@ void ApplicationImpl::Initialize(ShellPtr shell,
void ApplicationImpl::AcceptConnection(
const String& requestor_url,
InterfaceRequest<ServiceProvider> services,
- ServiceProviderPtr exposed_services,
+ InterfaceHandle<ServiceProvider> exposed_services,
const String& url) {
std::unique_ptr<internal::ServiceRegistry> registry(
new internal::ServiceRegistry(this, url, requestor_url,
- exposed_services.Pass(), services.Pass()));
+ std::move(exposed_services),
+ services.Pass()));
if (!delegate_->ConfigureIncomingConnection(registry.get()))
return;
incoming_service_registries_.push_back(std::move(registry));
« no previous file with comments | « mojo/public/cpp/application/connect.h ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698