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

Unified Diff: mojo/examples/browser/browser.cc

Issue 331323007: Eliminate Launchable. Use Navigator instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/examples/html_viewer/html_viewer.cc » ('j') | mojo/services/navigation/navigation.mojom » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/browser/browser.cc
diff --git a/mojo/examples/browser/browser.cc b/mojo/examples/browser/browser.cc
index a0c034553faeecf3316d9204b282d0bd3c8bffdd..bd0703c8c26f4fda33bd85c8717176a9766d7bc3 100644
--- a/mojo/examples/browser/browser.cc
+++ b/mojo/examples/browser/browser.cc
@@ -4,6 +4,7 @@
#include "base/basictypes.h"
#include "mojo/public/cpp/application/application.h"
+#include "mojo/services/navigation/navigation.mojom.h"
#include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/view.h"
#include "mojo/services/public/cpp/view_manager/view_manager.h"
@@ -146,11 +147,15 @@ class Browser : public Application,
ScopedDataPipeConsumerHandle response_body_stream) OVERRIDE {
content_node_->Embed(handler_url);
- launcher::LaunchablePtr launchable;
- ConnectTo(handler_url, &launchable);
- launchable->OnLaunch(response.Pass(),
- response_body_stream.Pass(),
- content_node_->id());
+ navigation::NavigationDetailsPtr details(
+ navigation::NavigationDetails::New());
+ details->url = response->url;
+ details->response = response.Pass();
+ details->response_body_stream = response_body_stream.Pass();
+
+ navigation::NavigatorPtr navigator;
+ ConnectTo(handler_url, &navigator);
+ navigator->Navigate(content_node_->id(), details.Pass());
}
scoped_ptr<ViewsInit> views_init_;
« no previous file with comments | « no previous file | mojo/examples/html_viewer/html_viewer.cc » ('j') | mojo/services/navigation/navigation.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698