| 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 <set> | 5 #include <set> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "mojo/application/public/cpp/application_connection.h" | |
| 16 #include "mojo/application/public/cpp/application_delegate.h" | |
| 17 #include "mojo/application/public/cpp/application_impl.h" | |
| 18 #include "mojo/application/public/cpp/application_runner.h" | |
| 19 #include "mojo/application/public/cpp/content_handler_factory.h" | |
| 20 #include "mojo/application/public/cpp/interface_factory_impl.h" | |
| 21 #include "mojo/message_pump/message_pump_mojo.h" | 15 #include "mojo/message_pump/message_pump_mojo.h" |
| 22 #include "mojo/public/cpp/bindings/strong_binding.h" | 16 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 17 #include "mojo/shell/public/cpp/application_connection.h" |
| 18 #include "mojo/shell/public/cpp/application_delegate.h" |
| 19 #include "mojo/shell/public/cpp/application_impl.h" |
| 20 #include "mojo/shell/public/cpp/application_runner.h" |
| 21 #include "mojo/shell/public/cpp/content_handler_factory.h" |
| 22 #include "mojo/shell/public/cpp/interface_factory_impl.h" |
| 23 | 23 |
| 24 namespace mojo { | 24 namespace mojo { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 class ApplicationThread : public base::PlatformThread::Delegate { | 28 class ApplicationThread : public base::PlatformThread::Delegate { |
| 29 public: | 29 public: |
| 30 ApplicationThread( | 30 ApplicationThread( |
| 31 scoped_refptr<base::SingleThreadTaskRunner> handler_thread, | 31 scoped_refptr<base::SingleThreadTaskRunner> handler_thread, |
| 32 const base::Callback<void(ApplicationThread*)>& termination_callback, | 32 const base::Callback<void(ApplicationThread*)>& termination_callback, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (application) | 134 if (application) |
| 135 loop.Run(); | 135 loop.Run(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ContentHandlerFactory::Create(ApplicationConnection* connection, | 138 void ContentHandlerFactory::Create(ApplicationConnection* connection, |
| 139 InterfaceRequest<ContentHandler> request) { | 139 InterfaceRequest<ContentHandler> request) { |
| 140 new ContentHandlerImpl(delegate_, std::move(request)); | 140 new ContentHandlerImpl(delegate_, std::move(request)); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace mojo | 143 } // namespace mojo |
| OLD | NEW |