| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 5 #ifndef CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| 6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "content/child/child_thread_impl.h" | 15 #include "content/child/child_thread_impl.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "content/public/utility/utility_thread.h" | 17 #include "content/public/utility/utility_thread.h" |
| 18 #include "mojo/public/cpp/bindings/binding_set.h" | 18 #include "mojo/public/cpp/bindings/binding_set.h" |
| 19 #include "services/service_manager/public/interfaces/service_factory.mojom.h" | 19 #include "services/service_manager/public/interfaces/service_factory.mojom.h" |
| 20 | 20 |
| 21 namespace service_manager { |
| 22 struct BindSourceInfo; |
| 23 } |
| 24 |
| 21 namespace content { | 25 namespace content { |
| 22 class UtilityBlinkPlatformImpl; | 26 class UtilityBlinkPlatformImpl; |
| 23 class UtilityServiceFactory; | 27 class UtilityServiceFactory; |
| 24 | 28 |
| 25 #if defined(COMPILER_MSVC) | 29 #if defined(COMPILER_MSVC) |
| 26 // See explanation for other RenderViewHostImpl which is the same issue. | 30 // See explanation for other RenderViewHostImpl which is the same issue. |
| 27 #pragma warning(push) | 31 #pragma warning(push) |
| 28 #pragma warning(disable: 4250) | 32 #pragma warning(disable: 4250) |
| 29 #endif | 33 #endif |
| 30 | 34 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 45 void Init(); | 49 void Init(); |
| 46 | 50 |
| 47 // ChildThread implementation. | 51 // ChildThread implementation. |
| 48 bool OnControlMessageReceived(const IPC::Message& msg) override; | 52 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 49 | 53 |
| 50 // IPC message handlers. | 54 // IPC message handlers. |
| 51 void OnBatchModeStarted(); | 55 void OnBatchModeStarted(); |
| 52 void OnBatchModeFinished(); | 56 void OnBatchModeFinished(); |
| 53 | 57 |
| 54 void BindServiceFactoryRequest( | 58 void BindServiceFactoryRequest( |
| 59 const service_manager::BindSourceInfo& source_info, |
| 55 service_manager::mojom::ServiceFactoryRequest request); | 60 service_manager::mojom::ServiceFactoryRequest request); |
| 56 | 61 |
| 57 // True when we're running in batch mode. | 62 // True when we're running in batch mode. |
| 58 bool batch_mode_; | 63 bool batch_mode_; |
| 59 | 64 |
| 60 std::unique_ptr<UtilityBlinkPlatformImpl> blink_platform_impl_; | 65 std::unique_ptr<UtilityBlinkPlatformImpl> blink_platform_impl_; |
| 61 | 66 |
| 62 // service_manager::mojom::ServiceFactory for service_manager::Service | 67 // service_manager::mojom::ServiceFactory for service_manager::Service |
| 63 // hosting. | 68 // hosting. |
| 64 std::unique_ptr<UtilityServiceFactory> service_factory_; | 69 std::unique_ptr<UtilityServiceFactory> service_factory_; |
| 65 | 70 |
| 66 // Bindings to the service_manager::mojom::ServiceFactory impl. | 71 // Bindings to the service_manager::mojom::ServiceFactory impl. |
| 67 mojo::BindingSet<service_manager::mojom::ServiceFactory> | 72 mojo::BindingSet<service_manager::mojom::ServiceFactory> |
| 68 service_factory_bindings_; | 73 service_factory_bindings_; |
| 69 | 74 |
| 70 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl); | 75 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl); |
| 71 }; | 76 }; |
| 72 | 77 |
| 73 #if defined(COMPILER_MSVC) | 78 #if defined(COMPILER_MSVC) |
| 74 #pragma warning(pop) | 79 #pragma warning(pop) |
| 75 #endif | 80 #endif |
| 76 | 81 |
| 77 } // namespace content | 82 } // namespace content |
| 78 | 83 |
| 79 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 84 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| OLD | NEW |