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

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

Issue 905583002: Pass the final URL an app was loaded from to the app in Initialize(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
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 46d368def198f5b7ba595a2e59b45c03afd0bbbc..885d0ffc9397a3f4557523c7c99fb82072eabaea 100644
--- a/mojo/public/cpp/application/application_impl.h
+++ b/mojo/public/cpp/application/application_impl.h
@@ -58,6 +58,8 @@ class ApplicationImpl : public Application {
Shell* shell() const { return shell_.get(); }
+ const std::string& url() const { return url_; }
+
// Returns any initial configuration arguments, passed by the Shell.
const std::vector<std::string>& args() const { return args_; }
bool HasArg(const std::string& arg) const;
@@ -74,7 +76,9 @@ class ApplicationImpl : public Application {
}
// Application implementation.
- void Initialize(ShellPtr shell, Array<String> args) override;
+ void Initialize(ShellPtr shell,
+ const mojo::String& url,
+ Array<String> args) override;
// Block until the Application is initialized, if it is not already.
void WaitForInitialize();
@@ -113,6 +117,7 @@ class ApplicationImpl : public Application {
Binding<Application> binding_;
ShellPtr shell_;
ShellPtrWatcher* shell_watch_;
+ std::string url_;
std::vector<std::string> args_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);

Powered by Google App Engine
This is Rietveld 408576698