| OLD | NEW |
| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/string_tokenizer.h" | 8 #include "base/strings/string_tokenizer.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
| 11 #include "mojo/public/cpp/application/application_delegate.h" | 11 #include "mojo/public/cpp/application/application_delegate.h" |
| 12 #include "mojo/public/cpp/application/application_impl.h" | 12 #include "mojo/public/cpp/application/application_impl.h" |
| 13 #include "mojo/public/cpp/application/application_runner_chromium.h" |
| 13 #include "mojo/public/cpp/application/interface_factory_impl.h" | 14 #include "mojo/public/cpp/application/interface_factory_impl.h" |
| 15 #include "mojo/public/cpp/system/main.h" |
| 14 #include "mojo/services/public/cpp/view_manager/types.h" | 16 #include "mojo/services/public/cpp/view_manager/types.h" |
| 15 #include "mojo/services/public/interfaces/launcher/launcher.mojom.h" | 17 #include "mojo/services/public/interfaces/launcher/launcher.mojom.h" |
| 16 #include "mojo/services/public/interfaces/network/network_service.mojom.h" | 18 #include "mojo/services/public/interfaces/network/network_service.mojom.h" |
| 17 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" | 19 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" |
| 18 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 19 | 21 |
| 20 namespace mojo { | 22 namespace mojo { |
| 21 | 23 |
| 22 namespace { | 24 namespace { |
| 23 | 25 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 ResponseDetailsPtr nav_response(ResponseDetails::New()); | 169 ResponseDetailsPtr nav_response(ResponseDetails::New()); |
| 168 nav_response->loader = url_loader_.Pass(); | 170 nav_response->loader = url_loader_.Pass(); |
| 169 nav_response->response = response.Pass(); | 171 nav_response->response = response.Pass(); |
| 170 String response_url = nav_response->response->url; | 172 String response_url = nav_response->response->url; |
| 171 callback_.Run(handler_url, response_url, nav_response.Pass()); | 173 callback_.Run(handler_url, response_url, nav_response.Pass()); |
| 172 } | 174 } |
| 173 } | 175 } |
| 174 ScheduleDestroy(); | 176 ScheduleDestroy(); |
| 175 } | 177 } |
| 176 | 178 |
| 177 // static | 179 } // namespace mojo |
| 178 ApplicationDelegate* ApplicationDelegate::Create() { | 180 |
| 179 return new LauncherApp; | 181 MojoResult MojoMain(MojoHandle shell_handle) { |
| 182 mojo::ApplicationRunnerChromium runner(new mojo::LauncherApp); |
| 183 return runner.Run(shell_handle); |
| 180 } | 184 } |
| 181 | |
| 182 } // namespace mojo | |
| OLD | NEW |