Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Side by Side Diff: remoting/host/win/rdp_client.cc

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/win/rdp_client.h ('k') | remoting/host/win/unprivileged_process_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/win/rdp_client.h" 5 #include "remoting/host/win/rdp_client.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <cstdint> 9 #include <cstdint>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const std::string& terminal_id, 96 const std::string& terminal_id,
97 DWORD port_number, 97 DWORD port_number,
98 EventHandler* event_handler) { 98 EventHandler* event_handler) {
99 DCHECK(caller_task_runner->BelongsToCurrentThread()); 99 DCHECK(caller_task_runner->BelongsToCurrentThread());
100 100
101 core_ = new Core(caller_task_runner, ui_task_runner, event_handler); 101 core_ = new Core(caller_task_runner, ui_task_runner, event_handler);
102 core_->Connect(resolution, terminal_id, port_number); 102 core_->Connect(resolution, terminal_id, port_number);
103 } 103 }
104 104
105 RdpClient::~RdpClient() { 105 RdpClient::~RdpClient() {
106 DCHECK(CalledOnValidThread()); 106 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
107 107
108 core_->Disconnect(); 108 core_->Disconnect();
109 } 109 }
110 110
111 void RdpClient::InjectSas() { 111 void RdpClient::InjectSas() {
112 DCHECK(CalledOnValidThread()); 112 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
113 113
114 core_->InjectSas(); 114 core_->InjectSas();
115 } 115 }
116 116
117 void RdpClient::ChangeResolution(const ScreenResolution& resolution) { 117 void RdpClient::ChangeResolution(const ScreenResolution& resolution) {
118 DCHECK(CalledOnValidThread()); 118 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
119 119
120 core_->ChangeResolution(resolution); 120 core_->ChangeResolution(resolution);
121 } 121 }
122 122
123 RdpClient::Core::Core( 123 RdpClient::Core::Core(
124 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 124 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
125 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 125 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
126 RdpClient::EventHandler* event_handler) 126 RdpClient::EventHandler* event_handler)
127 : caller_task_runner_(caller_task_runner), 127 : caller_task_runner_(caller_task_runner),
128 ui_task_runner_(ui_task_runner), 128 ui_task_runner_(ui_task_runner),
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 if (event_handler_) { 241 if (event_handler_) {
242 RdpClient::EventHandler* event_handler = event_handler_; 242 RdpClient::EventHandler* event_handler = event_handler_;
243 event_handler_ = nullptr; 243 event_handler_ = nullptr;
244 event_handler->OnRdpClosed(); 244 event_handler->OnRdpClosed();
245 } 245 }
246 } 246 }
247 247
248 } // namespace remoting 248 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/rdp_client.h ('k') | remoting/host/win/unprivileged_process_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698