| 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/application/content_handler_factory.h" | 5 #include "mojo/application/content_handler_factory.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 13 #include "base/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
| 14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
| 15 #include "mojo/application/application_runner_chromium.h" | |
| 16 #include "mojo/message_pump/message_pump_mojo.h" | 15 #include "mojo/message_pump/message_pump_mojo.h" |
| 17 #include "mojo/public/cpp/application/application_delegate.h" | |
| 18 #include "mojo/public/cpp/application/application_impl.h" | |
| 19 #include "mojo/public/cpp/bindings/strong_binding.h" | 16 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 20 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" | 17 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" |
| 21 | 18 |
| 22 namespace mojo { | 19 namespace mojo { |
| 23 | 20 |
| 24 namespace { | 21 namespace { |
| 25 | 22 |
| 26 class ApplicationThread : public base::PlatformThread::Delegate { | 23 class ApplicationThread : public base::PlatformThread::Delegate { |
| 27 public: | 24 public: |
| 28 ApplicationThread( | 25 ApplicationThread( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 InterfaceRequest<Application> application_request, | 121 InterfaceRequest<Application> application_request, |
| 125 URLResponsePtr response) { | 122 URLResponsePtr response) { |
| 126 base::MessageLoop loop(common::MessagePumpMojo::Create()); | 123 base::MessageLoop loop(common::MessagePumpMojo::Create()); |
| 127 auto application = | 124 auto application = |
| 128 this->CreateApplication(application_request.Pass(), response.Pass()); | 125 this->CreateApplication(application_request.Pass(), response.Pass()); |
| 129 if (application) | 126 if (application) |
| 130 loop.Run(); | 127 loop.Run(); |
| 131 } | 128 } |
| 132 | 129 |
| 133 } // namespace mojo | 130 } // namespace mojo |
| OLD | NEW |