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

Side by Side Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 1677753002: Mojo C++ bindings: InterfacePtr::PassInterface -> PassInterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « mojo/gpu/gl_context.cc ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/public/cpp/application/application_impl.h" 5 #include "mojo/public/cpp/application/application_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/lib/service_registry.h" 10 #include "mojo/public/cpp/application/lib/service_registry.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void ApplicationImpl::WaitForInitialize() { 52 void ApplicationImpl::WaitForInitialize() {
53 if (!shell_) 53 if (!shell_)
54 binding_.WaitForIncomingMethodCall(); 54 binding_.WaitForIncomingMethodCall();
55 } 55 }
56 56
57 void ApplicationImpl::UnbindConnections( 57 void ApplicationImpl::UnbindConnections(
58 InterfaceRequest<Application>* application_request, 58 InterfaceRequest<Application>* application_request,
59 ShellPtr* shell) { 59 ShellPtr* shell) {
60 *application_request = binding_.Unbind(); 60 *application_request = binding_.Unbind();
61 shell->Bind(shell_.PassInterface()); 61 shell->Bind(shell_.PassInterfaceHandle());
62 } 62 }
63 63
64 void ApplicationImpl::Initialize(ShellPtr shell, 64 void ApplicationImpl::Initialize(ShellPtr shell,
65 Array<String> args, 65 Array<String> args,
66 const mojo::String& url) { 66 const mojo::String& url) {
67 shell_ = shell.Pass(); 67 shell_ = shell.Pass();
68 shell_.set_connection_error_handler([this]() { 68 shell_.set_connection_error_handler([this]() {
69 delegate_->Quit(); 69 delegate_->Quit();
70 incoming_service_registries_.clear(); 70 incoming_service_registries_.clear();
71 outgoing_service_registries_.clear(); 71 outgoing_service_registries_.clear();
(...skipping 16 matching lines...) Expand all
88 return; 88 return;
89 incoming_service_registries_.push_back(std::move(registry)); 89 incoming_service_registries_.push_back(std::move(registry));
90 } 90 }
91 91
92 void ApplicationImpl::RequestQuit() { 92 void ApplicationImpl::RequestQuit() {
93 delegate_->Quit(); 93 delegate_->Quit();
94 Terminate(); 94 Terminate();
95 } 95 }
96 96
97 } // namespace mojo 97 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/gpu/gl_context.cc ('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