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 "mojo/runner/android/background_application_loader.h" | 5 #include "mojo/shell/standalone/android/background_application_loader.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "mojo/shell/application_manager.h" | 11 #include "mojo/shell/application_manager.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace runner { | 14 namespace shell { |
15 | 15 |
16 BackgroundApplicationLoader::BackgroundApplicationLoader( | 16 BackgroundApplicationLoader::BackgroundApplicationLoader( |
17 scoped_ptr<ApplicationLoader> real_loader, | 17 scoped_ptr<ApplicationLoader> real_loader, |
18 const std::string& thread_name, | 18 const std::string& thread_name, |
19 base::MessageLoop::Type message_loop_type) | 19 base::MessageLoop::Type message_loop_type) |
20 : loader_(std::move(real_loader)), | 20 : loader_(std::move(real_loader)), |
21 message_loop_type_(message_loop_type), | 21 message_loop_type_(message_loop_type), |
22 thread_name_(thread_name), | 22 thread_name_(thread_name), |
23 message_loop_created_(true, false) {} | 23 message_loop_created_(true, false) {} |
24 | 24 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 loader_.reset(); | 63 loader_.reset(); |
64 } | 64 } |
65 | 65 |
66 void BackgroundApplicationLoader::LoadOnBackgroundThread( | 66 void BackgroundApplicationLoader::LoadOnBackgroundThread( |
67 const GURL& url, | 67 const GURL& url, |
68 InterfaceRequest<Application> application_request) { | 68 InterfaceRequest<Application> application_request) { |
69 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 69 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
70 loader_->Load(url, std::move(application_request)); | 70 loader_->Load(url, std::move(application_request)); |
71 } | 71 } |
72 | 72 |
73 } // namespace runner | 73 } // namespace shell |
74 } // namespace mojo | 74 } // namespace mojo |
OLD | NEW |