| 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/desktop_session_proxy.h" | 5 #include "remoting/host/desktop_session_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 scoped_refptr<IpcSharedBufferCore> shared_buffer_core = | 475 scoped_refptr<IpcSharedBufferCore> shared_buffer_core = |
| 476 GetSharedBufferCore(serialized_frame.shared_buffer_id); | 476 GetSharedBufferCore(serialized_frame.shared_buffer_id); |
| 477 CHECK(shared_buffer_core.get()); | 477 CHECK(shared_buffer_core.get()); |
| 478 | 478 |
| 479 std::unique_ptr<webrtc::DesktopFrame> frame( | 479 std::unique_ptr<webrtc::DesktopFrame> frame( |
| 480 new webrtc::SharedMemoryDesktopFrame( | 480 new webrtc::SharedMemoryDesktopFrame( |
| 481 serialized_frame.dimensions, serialized_frame.bytes_per_row, | 481 serialized_frame.dimensions, serialized_frame.bytes_per_row, |
| 482 new IpcSharedBuffer(shared_buffer_core))); | 482 new IpcSharedBuffer(shared_buffer_core))); |
| 483 frame->set_capture_time_ms(serialized_frame.capture_time_ms); | 483 frame->set_capture_time_ms(serialized_frame.capture_time_ms); |
| 484 frame->set_dpi(serialized_frame.dpi); | 484 frame->set_dpi(serialized_frame.dpi); |
| 485 frame->set_capturer_id(serialized_frame.capturer_id); |
| 485 | 486 |
| 486 for (const auto& rect : serialized_frame.dirty_region) { | 487 for (const auto& rect : serialized_frame.dirty_region) { |
| 487 frame->mutable_updated_region()->AddRect(rect); | 488 frame->mutable_updated_region()->AddRect(rect); |
| 488 } | 489 } |
| 489 | 490 |
| 490 video_capturer_->OnCaptureResult(webrtc::DesktopCapturer::Result::SUCCESS, | 491 video_capturer_->OnCaptureResult(webrtc::DesktopCapturer::Result::SUCCESS, |
| 491 std::move(frame)); | 492 std::move(frame)); |
| 492 } | 493 } |
| 493 | 494 |
| 494 void DesktopSessionProxy::OnMouseCursor( | 495 void DesktopSessionProxy::OnMouseCursor( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 } | 528 } |
| 528 | 529 |
| 529 // static | 530 // static |
| 530 void DesktopSessionProxyTraits::Destruct( | 531 void DesktopSessionProxyTraits::Destruct( |
| 531 const DesktopSessionProxy* desktop_session_proxy) { | 532 const DesktopSessionProxy* desktop_session_proxy) { |
| 532 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, | 533 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, |
| 533 desktop_session_proxy); | 534 desktop_session_proxy); |
| 534 } | 535 } |
| 535 | 536 |
| 536 } // namespace remoting | 537 } // namespace remoting |
| OLD | NEW |