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

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

Issue 568173003: Add Initialize() method to Application with ability to send args using (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
Index: mojo/public/cpp/application/application_impl.h
diff --git a/mojo/public/cpp/application/application_impl.h b/mojo/public/cpp/application/application_impl.h
index 8d6ebd77c0ea3dbde551d1363d349bab8144e50b..afd2376b1da8cc7f55861a33d388f0fed0f9b5e7 100644
--- a/mojo/public/cpp/application/application_impl.h
+++ b/mojo/public/cpp/application/application_impl.h
@@ -60,6 +60,9 @@ class ApplicationImpl : public InterfaceImpl<Application> {
Shell* shell() const { return shell_.get(); }
+ // Returns any initial configuration arguments, passed by the Shell.
+ const Array<String>& args() { return args_; }
+
// Establishes a new connection to an application. Caller does not own.
ApplicationConnection* ConnectToApplication(const String& application_url);
@@ -85,15 +88,19 @@ class ApplicationImpl : public InterfaceImpl<Application> {
static void Terminate();
// Application implementation.
+ virtual void Initialize(Array<String> args) MOJO_OVERRIDE;
virtual void AcceptConnection(const String& requestor_url,
ServiceProviderPtr provider) MOJO_OVERRIDE;
typedef std::vector<internal::ServiceRegistry*> ServiceRegistryList;
+
+ bool initialized_;
ServiceRegistryList incoming_service_registries_;
ServiceRegistryList outgoing_service_registries_;
ApplicationDelegate* delegate_;
ShellPtr shell_;
ShellPtrWatcher* shell_watch_;
+ Array<String> args_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);
};
« no previous file with comments | « mojo/application_manager/application_manager_unittest.cc ('k') | mojo/public/cpp/application/lib/application_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698