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

Unified Diff: sky/viewer/content_handler_impl.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase + fix android 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: sky/viewer/content_handler_impl.cc
diff --git a/sky/viewer/content_handler_impl.cc b/sky/viewer/content_handler_impl.cc
index 0e5070bdbafcace7bcf600a3e66f268b936d695b..b36e4f7cbdc66e0cd07a0be2a9ea2a565da58dc8 100644
--- a/sky/viewer/content_handler_impl.cc
+++ b/sky/viewer/content_handler_impl.cc
@@ -17,8 +17,7 @@ class SkyApplication : public mojo::Application {
public:
SkyApplication(mojo::InterfaceRequest<mojo::Application> application,
mojo::URLResponsePtr response)
- : url_(response->url),
- binding_(this, application.Pass()),
+ : binding_(this, application.Pass()),
initial_response_(response.Pass()) {}
void Initialize(mojo::ShellPtr shell,
@@ -33,7 +32,8 @@ class SkyApplication : public mojo::Application {
void AcceptConnection(const mojo::String& requestor_url,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override {
+ mojo::ServiceProviderPtr exposed_services,
+ const mojo::String& url) override {
if (initial_response_) {
OnResponseReceived(mojo::URLLoaderPtr(), services.Pass(),
exposed_services.Pass(), initial_response_.Pass());
@@ -41,7 +41,7 @@ class SkyApplication : public mojo::Application {
mojo::URLLoaderPtr loader;
network_service_->CreateURLLoader(mojo::GetProxy(&loader));
mojo::URLRequestPtr request(mojo::URLRequest::New());
- request->url = url_;
+ request->url = url;
request->auto_follow_redirects = true;
// |loader| will be pass to the OnResponseReceived method through a
@@ -70,7 +70,6 @@ class SkyApplication : public mojo::Application {
shell_.get());
}
- mojo::String url_;
mojo::StrongBinding<mojo::Application> binding_;
mojo::ShellPtr shell_;
mojo::NetworkServicePtr network_service_;
« mojo/public/python/mojo_application/application_impl.py ('K') | « shell/test/pingable_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698