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

Side by Side Diff: mojo/application/public/cpp/application_impl.h

Issue 1427393002: Revert of Allow Chrome to bind an Application request from mojo_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@callback
Patch Set: Created 5 years, 1 month 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 #ifndef MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_ 5 #ifndef MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_
6 #define MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_ 6 #define MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 template <typename Interface> 107 template <typename Interface>
108 void ConnectToService(mojo::URLRequestPtr request, 108 void ConnectToService(mojo::URLRequestPtr request,
109 InterfacePtr<Interface>* ptr) { 109 InterfacePtr<Interface>* ptr) {
110 scoped_ptr<ApplicationConnection> connection = 110 scoped_ptr<ApplicationConnection> connection =
111 ConnectToApplication(request.Pass()); 111 ConnectToApplication(request.Pass());
112 if (!connection.get()) 112 if (!connection.get())
113 return; 113 return;
114 connection->ConnectToService(ptr); 114 connection->ConnectToService(ptr);
115 } 115 }
116 116
117 // Block the calling thread until the Initialize() method is called by the
118 // shell.
119 void WaitForInitialize();
120
121 // Initiate shutdown of this application. This may involve a round trip to the 117 // Initiate shutdown of this application. This may involve a round trip to the
122 // Shell to ensure there are no inbound service requests. 118 // Shell to ensure there are no inbound service requests.
123 void Quit(); 119 void Quit();
124 120
125 private: 121 private:
126 // Application implementation. 122 // Application implementation.
127 void Initialize(ShellPtr shell, const mojo::String& url) override; 123 void Initialize(ShellPtr shell, const mojo::String& url) override;
128 void AcceptConnection(const String& requestor_url, 124 void AcceptConnection(const String& requestor_url,
129 InterfaceRequest<ServiceProvider> services, 125 InterfaceRequest<ServiceProvider> services,
130 ServiceProviderPtr exposed_services, 126 ServiceProviderPtr exposed_services,
(...skipping 24 matching lines...) Expand all
155 AppLifetimeHelper app_lifetime_helper_; 151 AppLifetimeHelper app_lifetime_helper_;
156 bool quit_requested_; 152 bool quit_requested_;
157 base::WeakPtrFactory<ApplicationImpl> weak_factory_; 153 base::WeakPtrFactory<ApplicationImpl> weak_factory_;
158 154
159 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl); 155 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);
160 }; 156 };
161 157
162 } // namespace mojo 158 } // namespace mojo
163 159
164 #endif // MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_ 160 #endif // MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/example/main/main_application_delegate.cc ('k') | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698