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/client_session.h" | 5 #include "remoting/host/client_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 void ClientSession::SetDisableInputs(bool disable_inputs) { | 418 void ClientSession::SetDisableInputs(bool disable_inputs) { |
419 DCHECK(CalledOnValidThread()); | 419 DCHECK(CalledOnValidThread()); |
420 | 420 |
421 if (disable_inputs) | 421 if (disable_inputs) |
422 input_tracker_.ReleaseAll(); | 422 input_tracker_.ReleaseAll(); |
423 | 423 |
424 disable_input_filter_.set_enabled(!disable_inputs); | 424 disable_input_filter_.set_enabled(!disable_inputs); |
425 disable_clipboard_filter_.set_enabled(!disable_inputs); | 425 disable_clipboard_filter_.set_enabled(!disable_inputs); |
426 } | 426 } |
427 | 427 |
| 428 uint32_t ClientSession::desktop_session_id() const { |
| 429 DCHECK(CalledOnValidThread()); |
| 430 DCHECK(desktop_environment_); |
| 431 return desktop_environment_->GetDesktopSessionId(); |
| 432 } |
| 433 |
| 434 ClientSessionControl* ClientSession::session_control() { |
| 435 DCHECK(CalledOnValidThread()); |
| 436 return this; |
| 437 } |
| 438 |
428 std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { | 439 std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { |
429 DCHECK(CalledOnValidThread()); | 440 DCHECK(CalledOnValidThread()); |
430 | 441 |
431 return base::WrapUnique( | 442 return base::WrapUnique( |
432 new protocol::ClipboardThreadProxy(client_clipboard_factory_.GetWeakPtr(), | 443 new protocol::ClipboardThreadProxy(client_clipboard_factory_.GetWeakPtr(), |
433 base::ThreadTaskRunnerHandle::Get())); | 444 base::ThreadTaskRunnerHandle::Get())); |
434 } | 445 } |
435 | 446 |
436 void ClientSession::OnVideoSizeChanged(protocol::VideoStream* video_stream, | 447 void ClientSession::OnVideoSizeChanged(protocol::VideoStream* video_stream, |
437 const webrtc::DesktopSize& size, | 448 const webrtc::DesktopSize& size, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } | 487 } |
477 } | 488 } |
478 | 489 |
479 void ClientSession::OnVideoFrameSent(protocol::VideoStream* stream, | 490 void ClientSession::OnVideoFrameSent(protocol::VideoStream* stream, |
480 uint32_t frame_id, | 491 uint32_t frame_id, |
481 int64_t input_event_timestamp) { | 492 int64_t input_event_timestamp) { |
482 // TODO(sergeyu): Send a message to the client to notify about the new frame. | 493 // TODO(sergeyu): Send a message to the client to notify about the new frame. |
483 } | 494 } |
484 | 495 |
485 } // namespace remoting | 496 } // namespace remoting |
OLD | NEW |