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

Side by Side Diff: remoting/test/test_chromoting_client.cc

Issue 2425483002: Remove usage of FOR_EACH_OBSERVER macro in remoting (Closed)
Patch Set: braces Created 4 years, 2 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/signaling/xmpp_signal_strategy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/test_chromoting_client.h" 5 #include "remoting/test/test_chromoting_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 protocol::ConnectionToHost::State state, 190 protocol::ConnectionToHost::State state,
191 protocol::ErrorCode error_code) { 191 protocol::ErrorCode error_code) {
192 VLOG(1) << "TestChromotingClient::OnConnectionState(" 192 VLOG(1) << "TestChromotingClient::OnConnectionState("
193 << "state: " << protocol::ConnectionToHost::StateToString(state) 193 << "state: " << protocol::ConnectionToHost::StateToString(state)
194 << ", error_code: " << protocol::ErrorCodeToString(error_code) 194 << ", error_code: " << protocol::ErrorCodeToString(error_code)
195 << ") Called"; 195 << ") Called";
196 196
197 connection_error_code_ = error_code; 197 connection_error_code_ = error_code;
198 connection_to_host_state_ = state; 198 connection_to_host_state_ = state;
199 199
200 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 200 for (auto& observer : connection_observers_)
201 ConnectionStateChanged(state, error_code)); 201 observer.ConnectionStateChanged(state, error_code);
202 } 202 }
203 203
204 void TestChromotingClient::OnConnectionReady(bool ready) { 204 void TestChromotingClient::OnConnectionReady(bool ready) {
205 VLOG(1) << "TestChromotingClient::OnConnectionReady(" 205 VLOG(1) << "TestChromotingClient::OnConnectionReady("
206 << "ready:" << ready << ") Called"; 206 << "ready:" << ready << ") Called";
207 207
208 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 208 for (auto& observer : connection_observers_)
209 ConnectionReady(ready)); 209 observer.ConnectionReady(ready);
210 } 210 }
211 211
212 void TestChromotingClient::OnRouteChanged( 212 void TestChromotingClient::OnRouteChanged(
213 const std::string& channel_name, 213 const std::string& channel_name,
214 const protocol::TransportRoute& route) { 214 const protocol::TransportRoute& route) {
215 VLOG(1) << "TestChromotingClient::OnRouteChanged(" 215 VLOG(1) << "TestChromotingClient::OnRouteChanged("
216 << "channel_name:" << channel_name << ", " 216 << "channel_name:" << channel_name << ", "
217 << "route:" << protocol::TransportRoute::GetTypeString(route.type) 217 << "route:" << protocol::TransportRoute::GetTypeString(route.type)
218 << ") Called"; 218 << ") Called";
219 219
220 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 220 for (auto& observer : connection_observers_)
221 RouteChanged(channel_name, route)); 221 observer.RouteChanged(channel_name, route);
222 } 222 }
223 223
224 void TestChromotingClient::SetCapabilities(const std::string& capabilities) { 224 void TestChromotingClient::SetCapabilities(const std::string& capabilities) {
225 VLOG(1) << "TestChromotingClient::SetCapabilities(" 225 VLOG(1) << "TestChromotingClient::SetCapabilities("
226 << "capabilities: " << capabilities << ") Called"; 226 << "capabilities: " << capabilities << ") Called";
227 227
228 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 228 for (auto& observer : connection_observers_)
229 CapabilitiesSet(capabilities)); 229 observer.CapabilitiesSet(capabilities);
230 } 230 }
231 231
232 void TestChromotingClient::SetPairingResponse( 232 void TestChromotingClient::SetPairingResponse(
233 const protocol::PairingResponse& pairing_response) { 233 const protocol::PairingResponse& pairing_response) {
234 VLOG(1) << "TestChromotingClient::SetPairingResponse(" 234 VLOG(1) << "TestChromotingClient::SetPairingResponse("
235 << "client_id: " << pairing_response.client_id() << ", " 235 << "client_id: " << pairing_response.client_id() << ", "
236 << "shared_secret: " << pairing_response.shared_secret() 236 << "shared_secret: " << pairing_response.shared_secret()
237 << ") Called"; 237 << ") Called";
238 238
239 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 239 for (auto& observer : connection_observers_)
240 PairingResponseSet(pairing_response)); 240 observer.PairingResponseSet(pairing_response);
241 } 241 }
242 242
243 void TestChromotingClient::DeliverHostMessage( 243 void TestChromotingClient::DeliverHostMessage(
244 const protocol::ExtensionMessage& message) { 244 const protocol::ExtensionMessage& message) {
245 VLOG(1) << "TestChromotingClient::DeliverHostMessage(" 245 VLOG(1) << "TestChromotingClient::DeliverHostMessage("
246 << "type: " << message.type() << ", " 246 << "type: " << message.type() << ", "
247 << "data: " << message.data() << ") Called"; 247 << "data: " << message.data() << ") Called";
248 248
249 FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_, 249 for (auto& observer : connection_observers_)
250 HostMessageReceived(message)); 250 observer.HostMessageReceived(message);
251 } 251 }
252 252
253 void TestChromotingClient::SetDesktopSize(const webrtc::DesktopSize& size, 253 void TestChromotingClient::SetDesktopSize(const webrtc::DesktopSize& size,
254 const webrtc::DesktopVector& dpi) { 254 const webrtc::DesktopVector& dpi) {
255 VLOG(1) << "TestChromotingClient::SetDesktopSize() Called"; 255 VLOG(1) << "TestChromotingClient::SetDesktopSize() Called";
256 } 256 }
257 257
258 protocol::ClipboardStub* TestChromotingClient::GetClipboardStub() { 258 protocol::ClipboardStub* TestChromotingClient::GetClipboardStub() {
259 VLOG(1) << "TestChromotingClient::GetClipboardStub() Called"; 259 VLOG(1) << "TestChromotingClient::GetClipboardStub() Called";
260 return this; 260 return this;
261 } 261 }
262 262
263 protocol::CursorShapeStub* TestChromotingClient::GetCursorShapeStub() { 263 protocol::CursorShapeStub* TestChromotingClient::GetCursorShapeStub() {
264 VLOG(1) << "TestChromotingClient::GetCursorShapeStub() Called"; 264 VLOG(1) << "TestChromotingClient::GetCursorShapeStub() Called";
265 return this; 265 return this;
266 } 266 }
267 267
268 void TestChromotingClient::InjectClipboardEvent( 268 void TestChromotingClient::InjectClipboardEvent(
269 const protocol::ClipboardEvent& event) { 269 const protocol::ClipboardEvent& event) {
270 VLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called"; 270 VLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called";
271 } 271 }
272 272
273 void TestChromotingClient::SetCursorShape( 273 void TestChromotingClient::SetCursorShape(
274 const protocol::CursorShapeInfo& cursor_shape) { 274 const protocol::CursorShapeInfo& cursor_shape) {
275 VLOG(1) << "TestChromotingClient::SetCursorShape() Called"; 275 VLOG(1) << "TestChromotingClient::SetCursorShape() Called";
276 } 276 }
277 277
278 } // namespace test 278 } // namespace test
279 } // namespace remoting 279 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/signaling/xmpp_signal_strategy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698