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

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

Issue 2848753002: Forward capturer id from desktop process to network process (Closed)
Patch Set: Created 3 years, 7 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/host/chromoting_messages.h ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/desktop_session_agent.h" 5 #include "remoting/host/desktop_session_agent.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 313 DCHECK(caller_task_runner_->BelongsToCurrentThread());
314 314
315 // Serialize webrtc::DesktopFrame. 315 // Serialize webrtc::DesktopFrame.
316 SerializedDesktopFrame serialized_frame; 316 SerializedDesktopFrame serialized_frame;
317 if (frame) { 317 if (frame) {
318 serialized_frame.shared_buffer_id = frame->shared_memory()->id(); 318 serialized_frame.shared_buffer_id = frame->shared_memory()->id();
319 serialized_frame.bytes_per_row = frame->stride(); 319 serialized_frame.bytes_per_row = frame->stride();
320 serialized_frame.dimensions = frame->size(); 320 serialized_frame.dimensions = frame->size();
321 serialized_frame.capture_time_ms = frame->capture_time_ms(); 321 serialized_frame.capture_time_ms = frame->capture_time_ms();
322 serialized_frame.dpi = frame->dpi(); 322 serialized_frame.dpi = frame->dpi();
323 serialized_frame.capturer_id = frame->capturer_id();
323 for (webrtc::DesktopRegion::Iterator i(frame->updated_region()); 324 for (webrtc::DesktopRegion::Iterator i(frame->updated_region());
324 !i.IsAtEnd(); i.Advance()) { 325 !i.IsAtEnd(); i.Advance()) {
325 serialized_frame.dirty_region.push_back(i.rect()); 326 serialized_frame.dirty_region.push_back(i.rect());
326 } 327 }
327 } 328 }
328 329
329 last_frame_ = std::move(frame); 330 last_frame_ = std::move(frame);
330 331
331 SendToNetwork(base::MakeUnique<ChromotingDesktopNetworkMsg_CaptureResult>( 332 SendToNetwork(base::MakeUnique<ChromotingDesktopNetworkMsg_CaptureResult>(
332 result, serialized_frame)); 333 result, serialized_frame));
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 553 }
553 } 554 }
554 555
555 void DesktopSessionAgent::StopAudioCapturer() { 556 void DesktopSessionAgent::StopAudioCapturer() {
556 DCHECK(audio_capture_task_runner_->BelongsToCurrentThread()); 557 DCHECK(audio_capture_task_runner_->BelongsToCurrentThread());
557 558
558 audio_capturer_.reset(); 559 audio_capturer_.reset();
559 } 560 }
560 561
561 } // namespace remoting 562 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_messages.h ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698