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

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

Issue 342003006: Turn 'browser' app into a 'launcher_ui' app that window_manager embeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ben comments 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 navigation::ResponseDetailsPtr response_details = 148 client_->OnLaunch(handler_url, response.Pass(),
149 navigation::ResponseDetails::New(); 149 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());
154 } 150 }
155 } 151 }
156 152
157 } // namespace launcher 153 } // namespace launcher
158 154
159 // static 155 // static
160 Application* Application::Create() { 156 Application* Application::Create() {
161 return new launcher::LauncherApp; 157 return new launcher::LauncherApp;
162 } 158 }
163 159
164 } // namespace mojo 160 } // 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