| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/shell/static_application_loader.h" | 5 #include "mojo/shell/static_application_loader.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
| 12 #include "base/threading/simple_thread.h" | 12 #include "base/threading/simple_thread.h" |
| 13 #include "mojo/application/public/cpp/application_delegate.h" | 13 #include "mojo/application/public/cpp/application_delegate.h" |
| 14 #include "mojo/application/public/cpp/application_runner.h" | 14 #include "mojo/application/public/cpp/application_runner.h" |
| 15 #include "mojo/application/public/interfaces/application.mojom.h" | 15 #include "mojo/application/public/interfaces/application.mojom.h" |
| 16 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 16 #include "mojo/public/cpp/bindings/interface_request.h" |
| 17 | 17 |
| 18 namespace mojo { | 18 namespace mojo { |
| 19 namespace shell { | 19 namespace shell { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 class RunnerThread : public base::SimpleThread { | 23 class RunnerThread : public base::SimpleThread { |
| 24 public: | 24 public: |
| 25 RunnerThread(const GURL& url, | 25 RunnerThread(const GURL& url, |
| 26 InterfaceRequest<Application> request, | 26 InterfaceRequest<Application> request, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 void StaticApplicationLoader::StopAppThread() { | 87 void StaticApplicationLoader::StopAppThread() { |
| 88 thread_->Join(); | 88 thread_->Join(); |
| 89 thread_.reset(); | 89 thread_.reset(); |
| 90 if (!quit_callback_.is_null()) | 90 if (!quit_callback_.is_null()) |
| 91 quit_callback_.Run(); | 91 quit_callback_.Run(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace shell | 94 } // namespace shell |
| 95 } // namespace mojo | 95 } // namespace mojo |
| OLD | NEW |