| // Copyright 2026 The Chromium Authors | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #ifndef REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_LINUX_SINGLE_PROCESS_H_ | |
| #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_LINUX_SINGLE_PROCESS_H_ | |
| #include <memory> | |
| #include "remoting/host/setup/daemon_controller.h" | |
| namespace remoting { | |
| // DaemonController::Delegate implementation for the single-process Linux host. | |
| class DaemonControllerDelegateLinuxSingleProcess | |
| : public DaemonController::Delegate { | |
| public: | |
| DaemonControllerDelegateLinuxSingleProcess(); | |
| DaemonControllerDelegateLinuxSingleProcess( | |
| const DaemonControllerDelegateLinuxSingleProcess&) = delete; | |
| DaemonControllerDelegateLinuxSingleProcess& operator=( | |
| const DaemonControllerDelegateLinuxSingleProcess&) = delete; | |
| ~DaemonControllerDelegateLinuxSingleProcess() override; | |
| // Returns the path to the host configuration file. | |
| static base::FilePath GetConfigPath(); | |
| // DaemonController::Delegate interface. | |
| DaemonController::State GetState() override; | |
| std::optional<base::DictValue> GetConfig() override; | |
| void CheckPermission(bool it2me, DaemonController::BoolCallback) override; | |
| void SetConfigAndStart(base::DictValue config, | |
| bool consent, | |
| DaemonController::CompletionCallback done) override; | |
| void UpdateConfig(base::DictValue config, | |
| DaemonController::CompletionCallback done) override; | |
| void Stop(DaemonController::CompletionCallback done) override; | |
| DaemonController::UsageStatsConsent GetUsageStatsConsent() override; | |
| bool is_privileged() const override; | |
| bool is_multi_process() const override; | |
| // If |start_host| is true (the default), then SetConfigAndStart includes | |
| // the final step of starting the host (this step requires root, and hence | |
| // some interactive method of elevating). If |start_host| is false, then | |
| // SetConfigAndStart only sets the config, and it is up to the caller to | |
| // start the host if needed. | |
| static void set_start_host_after_setup(bool start_host); | |
| }; | |
| } // namespace remoting | |
| #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_LINUX_SINGLE_PROCESS_H_ |