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

Side by Side Diff: content/browser/renderer_host/media/desktop_capture_device.cc

Issue 140633004: Reland CL to implement browser-side logging to WebRtc log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: These are the changes that should fix crbug.com/338848 Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/renderer_host/media/desktop_capture_device.h" 5 #include "content/browser/renderer_host/media/desktop_capture_device.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 void DesktopCaptureDevice::Core::OnCaptureCompleted( 160 void DesktopCaptureDevice::Core::OnCaptureCompleted(
161 webrtc::DesktopFrame* frame) { 161 webrtc::DesktopFrame* frame) {
162 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 162 DCHECK(task_runner_->RunsTasksOnCurrentThread());
163 DCHECK(capture_in_progress_); 163 DCHECK(capture_in_progress_);
164 164
165 capture_in_progress_ = false; 165 capture_in_progress_ = false;
166 166
167 if (!frame) { 167 if (!frame) {
168 LOG(ERROR) << "Failed to capture a frame."; 168 std::string log("Failed to capture a frame.");
169 client_->OnError(); 169 LOG(ERROR) << log;
170 client_->OnError(log);
170 return; 171 return;
171 } 172 }
172 173
173 if (!client_) 174 if (!client_)
174 return; 175 return;
175 176
176 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame); 177 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame);
177 178
178 // Handle initial frame size and size changes. 179 // Handle initial frame size and size changes.
179 RefreshCaptureFormat(frame->size()); 180 RefreshCaptureFormat(frame->size());
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 const media::VideoCaptureParams& params, 412 const media::VideoCaptureParams& params,
412 scoped_ptr<Client> client) { 413 scoped_ptr<Client> client) {
413 core_->AllocateAndStart(params, client.Pass()); 414 core_->AllocateAndStart(params, client.Pass());
414 } 415 }
415 416
416 void DesktopCaptureDevice::StopAndDeAllocate() { 417 void DesktopCaptureDevice::StopAndDeAllocate() {
417 core_->StopAndDeAllocate(); 418 core_->StopAndDeAllocate();
418 } 419 }
419 420
420 } // namespace content 421 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698