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

Side by Side Diff: remoting/host/client_session.cc

Issue 2091553002: Expose ClientSession details to Host Extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@desktop_environment
Patch Set: Minor fixup Created 4 years, 5 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
OLDNEW
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
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 ClientSessionControl* ClientSession::session_control() {
429 DCHECK(CalledOnValidThread());
430 return this;
431 }
432
433 uint32_t ClientSession::desktop_session_id() const {
434 DCHECK(CalledOnValidThread());
435 return desktop_environment_ ? desktop_environment_->GetDesktopSessionId()
Sergey Ulanov 2016/06/27 19:51:30 nit: maybe allow this function to be called only w
joedow 2016/06/27 21:07:27 Done.
436 : UINT32_MAX;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698