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

Unified Diff: mojo/application/public/cpp/application_impl.h

Issue 1288743002: A few more spurious cleanups on ApplicationImpl. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/application_impl.h
diff --git a/mojo/application/public/cpp/application_impl.h b/mojo/application/public/cpp/application_impl.h
index e05e741144499c835e45f4357804a1c23fcb0501..b2e9675ade244a744a84ea500e26f59ddd736c23 100644
--- a/mojo/application/public/cpp/application_impl.h
+++ b/mojo/application/public/cpp/application_impl.h
@@ -56,6 +56,20 @@ namespace mojo {
//
class ApplicationImpl : public Application {
public:
+ class TestApi {
+ public:
+ explicit TestApi(ApplicationImpl* application)
+ : application_(application) {}
+
+ void UnbindConnections(InterfaceRequest<Application>* application_request,
+ ShellPtr* shell) {
+ application_->UnbindConnections(application_request, shell);
+ }
+
+ private:
+ ApplicationImpl* application_;
+ };
+
// Does not take ownership of |delegate|, which must remain valid for the
// lifetime of ApplicationImpl.
ApplicationImpl(ApplicationDelegate* delegate,
@@ -98,24 +112,13 @@ class ApplicationImpl : public Application {
connection->ConnectToService(ptr);
}
- // Application implementation.
- void Initialize(ShellPtr shell, const mojo::String& url) override;
-
- // Block until the Application is initialized, if it is not already.
- void WaitForInitialize();
-
- // Unbinds the Shell and Application connections. Can be used to re-bind the
- // handles to another implementation of ApplicationImpl, for instance when
- // running apptests.
- void UnbindConnections(InterfaceRequest<Application>* application_request,
- ShellPtr* shell);
-
// Initiate shutdown of this application. This may involve a round trip to the
// Shell to ensure there are no inbound service requests.
void Quit();
private:
// Application implementation.
+ void Initialize(ShellPtr shell, const mojo::String& url) override;
void AcceptConnection(const String& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
@@ -129,6 +132,12 @@ class ApplicationImpl : public Application {
// from Quit() once the Shell has OK'ed shutdown.
void QuitNow();
+ // Unbinds the Shell and Application connections. Can be used to re-bind the
+ // handles to another implementation of ApplicationImpl, for instance when
+ // running apptests.
+ void UnbindConnections(InterfaceRequest<Application>* application_request,
+ ShellPtr* shell);
+
// We track the lifetime of incoming connection registries as it more
// convenient for the client.
ScopedVector<ApplicationConnection> incoming_connections_;
« no previous file with comments | « no previous file | mojo/application/public/cpp/lib/application_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698