summaryrefslogtreecommitdiffstats
path: root/mojo/examples/window_manager
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 12:56:47 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 12:56:47 +0000
commita0fb77a84519d63b34271b5fca95c2ffaa31d4a1 (patch)
tree43a3ff6ab1f3ade9a6104e581245ff830787e5f9 /mojo/examples/window_manager
parent82cbf5377c1609e22c31141360e78e2700ad3728 (diff)
downloadchromium_src-a0fb77a84519d63b34271b5fca95c2ffaa31d4a1.zip
chromium_src-a0fb77a84519d63b34271b5fca95c2ffaa31d4a1.tar.gz
chromium_src-a0fb77a84519d63b34271b5fca95c2ffaa31d4a1.tar.bz2
Mojo: teach launcher about mojo:// URLs.
Now you can type, e.g., mojo://mojo_embedded_app/ffff00ff into the box and get a purple square. Review URL: https://codereview.chromium.org/345773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/window_manager')
-rw-r--r--mojo/examples/window_manager/window_manager.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc
index a8fef81..78a2be7 100644
--- a/mojo/examples/window_manager/window_manager.cc
+++ b/mojo/examples/window_manager/window_manager.cc
@@ -113,9 +113,9 @@ class WindowManager : public Application,
if (event->action == ui::ET_MOUSE_RELEASED) {
std::string app_url;
if (event->flags & ui::EF_LEFT_MOUSE_BUTTON)
- app_url = "mojo:mojo_embedded_app";
+ app_url = "mojo://mojo_embedded_app";
else if (event->flags & ui::EF_RIGHT_MOUSE_BUTTON)
- app_url = "mojo:mojo_nesting_app";
+ app_url = "mojo://mojo_nesting_app";
DCHECK(!app_url.empty());
Node* node = view_manager_->GetNodeById(parent_node_id_);
@@ -149,16 +149,12 @@ class WindowManager : public Application,
// Overridden from LauncherClient:
virtual void OnLaunch(
- const mojo::String& handler_url, mojo::URLResponsePtr response,
- mojo::ScopedDataPipeConsumerHandle response_body_stream) OVERRIDE {
+ const mojo::String& requested_url, const mojo::String& handler_url,
+ navigation::ResponseDetailsPtr response) OVERRIDE {
navigation::NavigationDetailsPtr nav_details(
navigation::NavigationDetails::New());
- nav_details->url = response->url;
- navigation::ResponseDetailsPtr response_details(
- navigation::ResponseDetails::New());
- response_details->response = response.Pass();
- response_details->response_body_stream = response_body_stream.Pass();
- CreateWindow(handler_url, nav_details.Pass(), response_details.Pass());
+ nav_details->url = requested_url;
+ CreateWindow(handler_url, nav_details.Pass(), response.Pass());
}
void CreateLauncherUI() {