Commit 56499744 authored by jiayl's avatar jiayl Committed by Commit bot

Add logging for debugging screen capture notification window not excluded on Mac.

BUG=414362

Review URL: https://codereview.chromium.org/576543003

Cr-Commit-Position: refs/heads/master@{#294977}
parent 7f47ffd4
......@@ -263,6 +263,8 @@ void VideoCaptureManager::DoStartDeviceOnDeviceThread(
notification_window_ids_.end()) {
static_cast<DesktopCaptureDevice*>(video_capture_device.get())
->SetNotificationWindowId(notification_window_ids_[session_id]);
VLOG(2) << "Screen capture notification window passed for session "
<< session_id;
}
}
#endif // defined(ENABLE_SCREEN_CAPTURE)
......@@ -410,8 +412,11 @@ void VideoCaptureManager::SetDesktopCaptureWindowId(
media::VideoCaptureSessionId session_id,
gfx::NativeViewId window_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
VLOG(2) << "SetDesktopCaptureWindowId called for session " << session_id;
SessionMap::iterator session_it = sessions_.find(session_id);
if (session_it == sessions_.end()) {
VLOG(2) << "Session not found, will save the notification window.";
device_task_runner_->PostTask(
FROM_HERE,
base::Bind(
......@@ -424,13 +429,16 @@ void VideoCaptureManager::SetDesktopCaptureWindowId(
DeviceEntry* const existing_device =
GetDeviceEntryForMediaStreamDevice(session_it->second);
if (!existing_device)
if (!existing_device) {
VLOG(2) << "Failed to find an existing device.";
return;
}
DCHECK_EQ(MEDIA_DESKTOP_VIDEO_CAPTURE, existing_device->stream_type);
DesktopMediaID id = DesktopMediaID::Parse(existing_device->id);
if (id.type == DesktopMediaID::TYPE_NONE ||
id.type == DesktopMediaID::TYPE_AURA_WINDOW) {
VLOG(2) << "Video capture device type mismatch.";
return;
}
......@@ -640,6 +648,7 @@ void VideoCaptureManager::SetDesktopCaptureWindowIdOnDeviceThread(
DesktopCaptureDevice* device =
static_cast<DesktopCaptureDevice*>(entry->video_capture_device.get());
device->SetNotificationWindowId(window_id);
VLOG(2) << "Screen capture notification window passed on device thread.";
#endif
}
......@@ -650,6 +659,8 @@ void VideoCaptureManager::SaveDesktopCaptureWindowIdOnDeviceThread(
DCHECK(notification_window_ids_.find(session_id) ==
notification_window_ids_.end());
notification_window_ids_[session_id] = window_id;
VLOG(2) << "Screen capture notification window saved for session "
<< session_id << " on device thread.";
}
} // namespace content
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