OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void SetCapabilities(const protocol::Capabilities& capabilities) override {} | 58 void SetCapabilities(const protocol::Capabilities& capabilities) override {} |
59 | 59 |
60 void SetPairingResponse( | 60 void SetPairingResponse( |
61 const protocol::PairingResponse& pairing_response) override {} | 61 const protocol::PairingResponse& pairing_response) override {} |
62 | 62 |
63 void DeliverHostMessage(const protocol::ExtensionMessage& message) override { | 63 void DeliverHostMessage(const protocol::ExtensionMessage& message) override { |
64 message_ = message; | 64 message_ = message; |
65 run_loop_->Quit(); | 65 run_loop_->Quit(); |
66 } | 66 } |
67 | 67 |
| 68 void SetVideoLayout(const protocol::VideoLayout& layout) override {} |
| 69 |
68 // protocol::ClipboardStub implementation. | 70 // protocol::ClipboardStub implementation. |
69 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override {} | 71 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override {} |
70 | 72 |
71 // protocol::CursorShapeStub implementation. | 73 // protocol::CursorShapeStub implementation. |
72 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override {} | 74 void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override {} |
73 | 75 |
74 void WaitForDeliverHostMessage(base::TimeDelta max_timeout) { | 76 void WaitForDeliverHostMessage(base::TimeDelta max_timeout) { |
75 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 77 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
76 FROM_HERE, run_loop_->QuitClosure(), max_timeout); | 78 FROM_HERE, run_loop_->QuitClosure(), max_timeout); |
77 run_loop_->Run(); | 79 run_loop_->Run(); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 mock_gnubby_auth_handler_->GetSendMessageCallback().Run(42, "test_msg"); | 370 mock_gnubby_auth_handler_->GetSendMessageCallback().Run(42, "test_msg"); |
369 | 371 |
370 client_stub_.WaitForDeliverHostMessage( | 372 client_stub_.WaitForDeliverHostMessage( |
371 base::TimeDelta::FromMilliseconds(500)); | 373 base::TimeDelta::FromMilliseconds(500)); |
372 | 374 |
373 // Expects a JSON array of the ASCII character codes for "test_msg". | 375 // Expects a JSON array of the ASCII character codes for "test_msg". |
374 client_stub_.CheckHostDataMessage(42, "[116,101,115,116,95,109,115,103]"); | 376 client_stub_.CheckHostDataMessage(42, "[116,101,115,116,95,109,115,103]"); |
375 } | 377 } |
376 | 378 |
377 } // namespace remoting | 379 } // namespace remoting |
OLD | NEW |