Commit a1336afb authored by zijiehe's avatar zijiehe Committed by Commit bot

Forward capturer id from desktop process to network process

Updates of message, proxy and agent are needed to forward capturer id to the
network process and eventually to the client.

BUG=chromium:679523, chromium:650926

Review-Url: https://codereview.chromium.org/2848753002
Cr-Commit-Position: refs/heads/master@{#467902}
parent 7ed243fc
......@@ -167,6 +167,9 @@ IPC_STRUCT_BEGIN(SerializedDesktopFrame)
// DPI for this frame.
IPC_STRUCT_MEMBER(webrtc::DesktopVector, dpi)
// Capturer Id
IPC_STRUCT_MEMBER(uint32_t, capturer_id)
IPC_STRUCT_END()
IPC_ENUM_TRAITS_MAX_VALUE(webrtc::DesktopCapturer::Result,
......
......@@ -320,6 +320,7 @@ void DesktopSessionAgent::OnCaptureResult(
serialized_frame.dimensions = frame->size();
serialized_frame.capture_time_ms = frame->capture_time_ms();
serialized_frame.dpi = frame->dpi();
serialized_frame.capturer_id = frame->capturer_id();
for (webrtc::DesktopRegion::Iterator i(frame->updated_region());
!i.IsAtEnd(); i.Advance()) {
serialized_frame.dirty_region.push_back(i.rect());
......
......@@ -482,6 +482,7 @@ void DesktopSessionProxy::OnCaptureResult(
new IpcSharedBuffer(shared_buffer_core)));
frame->set_capture_time_ms(serialized_frame.capture_time_ms);
frame->set_dpi(serialized_frame.dpi);
frame->set_capturer_id(serialized_frame.capturer_id);
for (const auto& rect : serialized_frame.dirty_region) {
frame->mutable_updated_region()->AddRect(rect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment