| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 5 #ifndef CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| 6 #define CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 6 #define CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Aura is backed by mus and chrome and ash are in separate processes. In | 51 // Aura is backed by mus and chrome and ash are in separate processes. In |
| 52 // this mode chrome code can only use ash code in ash/public/cpp. | 52 // this mode chrome code can only use ash code in ash/public/cpp. |
| 53 MASH, | 53 MASH, |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 MojoTestConnector(std::unique_ptr<base::Value> catalog_contents, | 56 MojoTestConnector(std::unique_ptr<base::Value> catalog_contents, |
| 57 Config config); | 57 Config config); |
| 58 ~MojoTestConnector(); | 58 ~MojoTestConnector(); |
| 59 | 59 |
| 60 service_manager::BackgroundServiceManager* background_service_manager() { |
| 61 return background_service_manager_.get(); |
| 62 } |
| 63 |
| 64 // Initializes the Mojo environment, and IPC thread. |
| 65 void Init(); |
| 66 |
| 60 // Initializes the background thread the ServiceManager runs on. | 67 // Initializes the background thread the ServiceManager runs on. |
| 61 service_manager::mojom::ServiceRequest Init(); | 68 service_manager::mojom::ServiceRequest InitBackgroundServiceManager(); |
| 62 | 69 |
| 63 std::unique_ptr<content::TestState> PrepareForTest( | 70 std::unique_ptr<content::TestState> PrepareForTest( |
| 64 base::CommandLine* command_line, | 71 base::CommandLine* command_line, |
| 65 base::TestLauncher::LaunchOptions* test_launch_options, | 72 base::TestLauncher::LaunchOptions* test_launch_options, |
| 66 base::OnceClosure on_process_launched); | 73 base::OnceClosure on_process_launched); |
| 67 | 74 |
| 68 void StartService(const std::string& service_name); | 75 void StartService(const std::string& service_name); |
| 69 | 76 |
| 70 private: | 77 private: |
| 71 class ServiceProcessLauncherDelegateImpl; | 78 class ServiceProcessLauncherDelegateImpl; |
| 72 | 79 |
| 73 const Config config_; | 80 const Config config_; |
| 74 | 81 |
| 75 std::unique_ptr<ServiceProcessLauncherDelegateImpl> | 82 std::unique_ptr<ServiceProcessLauncherDelegateImpl> |
| 76 service_process_launcher_delegate_; | 83 service_process_launcher_delegate_; |
| 77 std::unique_ptr<service_manager::BackgroundServiceManager> | 84 std::unique_ptr<service_manager::BackgroundServiceManager> |
| 78 background_service_manager_; | 85 background_service_manager_; |
| 79 | 86 |
| 80 std::unique_ptr<base::Thread> ipc_thread_; | 87 std::unique_ptr<base::Thread> ipc_thread_; |
| 81 std::unique_ptr<mojo::edk::ScopedIPCSupport> ipc_support_; | 88 std::unique_ptr<mojo::edk::ScopedIPCSupport> ipc_support_; |
| 82 | 89 |
| 83 std::unique_ptr<base::Value> catalog_contents_; | 90 std::unique_ptr<base::Value> catalog_contents_; |
| 84 | 91 |
| 85 DISALLOW_COPY_AND_ASSIGN(MojoTestConnector); | 92 DISALLOW_COPY_AND_ASSIGN(MojoTestConnector); |
| 86 }; | 93 }; |
| 87 | 94 |
| 88 #endif // CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ | 95 #endif // CHROME_TEST_BASE_MOJO_TEST_CONNECTOR_H_ |
| OLD | NEW |