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 #include "remoting/host/desktop_session_win.h" | 5 #include "remoting/host/desktop_session_win.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <sddl.h> | 8 #include <sddl.h> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 ConsoleSession( | 89 ConsoleSession( |
90 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 90 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
91 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 91 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
92 DaemonProcess* daemon_process, | 92 DaemonProcess* daemon_process, |
93 int id, | 93 int id, |
94 WtsTerminalMonitor* monitor); | 94 WtsTerminalMonitor* monitor); |
95 virtual ~ConsoleSession(); | 95 virtual ~ConsoleSession(); |
96 | 96 |
97 protected: | 97 protected: |
98 // DesktopSession overrides. | 98 // DesktopSession overrides. |
99 virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; | 99 virtual void SetScreenResolution(const ScreenResolution& resolution) override; |
100 | 100 |
101 // DesktopSessionWin overrides. | 101 // DesktopSessionWin overrides. |
102 virtual void InjectSas() OVERRIDE; | 102 virtual void InjectSas() override; |
103 | 103 |
104 private: | 104 private: |
105 scoped_ptr<SasInjector> sas_injector_; | 105 scoped_ptr<SasInjector> sas_injector_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(ConsoleSession); | 107 DISALLOW_COPY_AND_ASSIGN(ConsoleSession); |
108 }; | 108 }; |
109 | 109 |
110 // DesktopSession implementation which attaches to virtual RDP console. | 110 // DesktopSession implementation which attaches to virtual RDP console. |
111 // Receives IPC messages from the desktop process, running in the console | 111 // Receives IPC messages from the desktop process, running in the console |
112 // session, via |WorkerProcessIpcDelegate|, and monitors console session | 112 // session, via |WorkerProcessIpcDelegate|, and monitors console session |
(...skipping 11 matching lines...) Expand all Loading... |
124 | 124 |
125 // Performs the part of initialization that can fail. | 125 // Performs the part of initialization that can fail. |
126 bool Initialize(const ScreenResolution& resolution); | 126 bool Initialize(const ScreenResolution& resolution); |
127 | 127 |
128 // Mirrors IRdpDesktopSessionEventHandler. | 128 // Mirrors IRdpDesktopSessionEventHandler. |
129 void OnRdpConnected(); | 129 void OnRdpConnected(); |
130 void OnRdpClosed(); | 130 void OnRdpClosed(); |
131 | 131 |
132 protected: | 132 protected: |
133 // DesktopSession overrides. | 133 // DesktopSession overrides. |
134 virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; | 134 virtual void SetScreenResolution(const ScreenResolution& resolution) override; |
135 | 135 |
136 // DesktopSessionWin overrides. | 136 // DesktopSessionWin overrides. |
137 virtual void InjectSas() OVERRIDE; | 137 virtual void InjectSas() override; |
138 | 138 |
139 private: | 139 private: |
140 // An implementation of IRdpDesktopSessionEventHandler interface that forwards | 140 // An implementation of IRdpDesktopSessionEventHandler interface that forwards |
141 // notifications to the owning desktop session. | 141 // notifications to the owning desktop session. |
142 class EventHandler : public IRdpDesktopSessionEventHandler { | 142 class EventHandler : public IRdpDesktopSessionEventHandler { |
143 public: | 143 public: |
144 explicit EventHandler(base::WeakPtr<RdpSession> desktop_session); | 144 explicit EventHandler(base::WeakPtr<RdpSession> desktop_session); |
145 virtual ~EventHandler(); | 145 virtual ~EventHandler(); |
146 | 146 |
147 // IUnknown interface. | 147 // IUnknown interface. |
148 STDMETHOD_(ULONG, AddRef)() OVERRIDE; | 148 STDMETHOD_(ULONG, AddRef)() override; |
149 STDMETHOD_(ULONG, Release)() OVERRIDE; | 149 STDMETHOD_(ULONG, Release)() override; |
150 STDMETHOD(QueryInterface)(REFIID riid, void** ppv) OVERRIDE; | 150 STDMETHOD(QueryInterface)(REFIID riid, void** ppv) override; |
151 | 151 |
152 // IRdpDesktopSessionEventHandler interface. | 152 // IRdpDesktopSessionEventHandler interface. |
153 STDMETHOD(OnRdpConnected)() OVERRIDE; | 153 STDMETHOD(OnRdpConnected)() override; |
154 STDMETHOD(OnRdpClosed)() OVERRIDE; | 154 STDMETHOD(OnRdpClosed)() override; |
155 | 155 |
156 private: | 156 private: |
157 ULONG ref_count_; | 157 ULONG ref_count_; |
158 | 158 |
159 // Points to the desktop session object receiving OnRdpXxx() notifications. | 159 // Points to the desktop session object receiving OnRdpXxx() notifications. |
160 base::WeakPtr<RdpSession> desktop_session_; | 160 base::WeakPtr<RdpSession> desktop_session_; |
161 | 161 |
162 // This class must be used on a single thread. | 162 // This class must be used on a single thread. |
163 base::ThreadChecker thread_checker_; | 163 base::ThreadChecker thread_checker_; |
164 | 164 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 exploded.hour, | 602 exploded.hour, |
603 exploded.minute, | 603 exploded.minute, |
604 exploded.second, | 604 exploded.second, |
605 exploded.millisecond, | 605 exploded.millisecond, |
606 passed.c_str()); | 606 passed.c_str()); |
607 | 607 |
608 last_timestamp_ = now; | 608 last_timestamp_ = now; |
609 } | 609 } |
610 | 610 |
611 } // namespace remoting | 611 } // namespace remoting |
OLD | NEW |