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

Side by Side Diff: mojo/services/launcher/launcher.cc

Issue 331323007: Eliminate Launchable. Use Navigator instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/navigation/navigation.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/string_tokenizer.h" 7 #include "base/strings/string_tokenizer.h"
8 #include "mojo/public/cpp/application/application.h" 8 #include "mojo/public/cpp/application/application.h"
9 #include "mojo/services/public/cpp/view_manager/types.h" 9 #include "mojo/services/public/cpp/view_manager/types.h"
10 #include "mojo/services/public/interfaces/launcher/launcher.mojom.h" 10 #include "mojo/services/public/interfaces/launcher/launcher.mojom.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 DataPipe data_pipe; 138 DataPipe data_pipe;
139 response_body_stream_ = data_pipe.consumer_handle.Pass(); 139 response_body_stream_ = data_pipe.consumer_handle.Pass();
140 140
141 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass()); 141 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass());
142 } 142 }
143 143
144 void LaunchInstance::OnReceivedResponse(URLResponsePtr response) { 144 void LaunchInstance::OnReceivedResponse(URLResponsePtr response) {
145 std::string content_type = GetContentType(response->headers); 145 std::string content_type = GetContentType(response->headers);
146 std::string handler_url = app_->GetHandlerForContentType(content_type); 146 std::string handler_url = app_->GetHandlerForContentType(content_type);
147 if (!handler_url.empty()) { 147 if (!handler_url.empty()) {
148 client_->OnLaunch(handler_url, 148 navigation::ResponseDetailsPtr response_details =
149 response.Pass(), 149 navigation::ResponseDetails::New();
150 response_body_stream_.Pass()); 150 response_details->response = response.Pass();
151 response_details->response_body_stream = response_body_stream_.Pass();
152
153 client_->OnLaunch(handler_url, response_details.Pass());
151 } 154 }
152 } 155 }
153 156
154 } // namespace launcher 157 } // namespace launcher
155 158
156 // static 159 // static
157 Application* Application::Create() { 160 Application* Application::Create() {
158 return new launcher::LauncherApp; 161 return new launcher::LauncherApp;
159 } 162 }
160 163
161 } // namespace mojo 164 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/navigation/navigation.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698