| 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 REMOTING_HOST_WIN_HOST_SERVICE_H_ | 5 #ifndef REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| 6 #define REMOTING_HOST_WIN_HOST_SERVICE_H_ | 6 #define REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <list> | 11 #include <list> |
| 12 #include <memory> |
| 12 | 13 |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
| 19 #include "remoting/host/win/wts_terminal_monitor.h" | 19 #include "remoting/host/win/wts_terminal_monitor.h" |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class CommandLine; | 22 class CommandLine; |
| 23 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
| 24 } // namespace base | 24 } // namespace base |
| 25 | 25 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 uint32_t session_id; | 97 uint32_t session_id; |
| 98 | 98 |
| 99 // Points to the observer receiving notifications about the WTS terminal | 99 // Points to the observer receiving notifications about the WTS terminal |
| 100 // identified by |terminal_id|. | 100 // identified by |terminal_id|. |
| 101 WtsTerminalObserver* observer; | 101 WtsTerminalObserver* observer; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 // The list of observers receiving session notifications. | 104 // The list of observers receiving session notifications. |
| 105 std::list<RegisteredObserver> observers_; | 105 std::list<RegisteredObserver> observers_; |
| 106 | 106 |
| 107 scoped_ptr<DaemonProcess> daemon_process_; | 107 std::unique_ptr<DaemonProcess> daemon_process_; |
| 108 | 108 |
| 109 // Service message loop. |main_task_runner_| must be valid as long as the | 109 // Service message loop. |main_task_runner_| must be valid as long as the |
| 110 // Control+C or service notification handler is registered. | 110 // Control+C or service notification handler is registered. |
| 111 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 111 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 112 | 112 |
| 113 // The action routine to be executed. | 113 // The action routine to be executed. |
| 114 int (HostService::*run_routine_)(); | 114 int (HostService::*run_routine_)(); |
| 115 | 115 |
| 116 // The service status handle. | 116 // The service status handle. |
| 117 SERVICE_STATUS_HANDLE service_status_handle_; | 117 SERVICE_STATUS_HANDLE service_status_handle_; |
| 118 | 118 |
| 119 // A waitable event that is used to wait until the service is stopped. | 119 // A waitable event that is used to wait until the service is stopped. |
| 120 base::WaitableEvent stopped_event_; | 120 base::WaitableEvent stopped_event_; |
| 121 | 121 |
| 122 base::WeakPtr<HostService> weak_ptr_; | 122 base::WeakPtr<HostService> weak_ptr_; |
| 123 | 123 |
| 124 // Used to post session change notifications and control events. | 124 // Used to post session change notifications and control events. |
| 125 base::WeakPtrFactory<HostService> weak_factory_; | 125 base::WeakPtrFactory<HostService> weak_factory_; |
| 126 | 126 |
| 127 // Singleton. | 127 // Singleton. |
| 128 friend struct base::DefaultSingletonTraits<HostService>; | 128 friend struct base::DefaultSingletonTraits<HostService>; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(HostService); | 130 DISALLOW_COPY_AND_ASSIGN(HostService); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace remoting | 133 } // namespace remoting |
| 134 | 134 |
| 135 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ | 135 #endif // REMOTING_HOST_WIN_HOST_SERVICE_H_ |
| OLD | NEW |