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

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

Issue 132233058: Revert 247164 "Implement browser-side logging to WebRtc log" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 std::string log("Failed to capture a frame."); 168 LOG(ERROR) << "Failed to capture a frame.";
169 LOG(ERROR) << log; 169 client_->OnError();
170 client_->OnError(log);
171 return; 170 return;
172 } 171 }
173 172
174 if (!client_) 173 if (!client_)
175 return; 174 return;
176 175
177 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame); 176 scoped_ptr<webrtc::DesktopFrame> owned_frame(frame);
178 177
179 // Handle initial frame size and size changes. 178 // Handle initial frame size and size changes.
180 RefreshCaptureFormat(frame->size()); 179 RefreshCaptureFormat(frame->size());
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 const media::VideoCaptureParams& params, 411 const media::VideoCaptureParams& params,
413 scoped_ptr<Client> client) { 412 scoped_ptr<Client> client) {
414 core_->AllocateAndStart(params, client.Pass()); 413 core_->AllocateAndStart(params, client.Pass());
415 } 414 }
416 415
417 void DesktopCaptureDevice::StopAndDeAllocate() { 416 void DesktopCaptureDevice::StopAndDeAllocate() {
418 core_->StopAndDeAllocate(); 417 core_->StopAndDeAllocate();
419 } 418 }
420 419
421 } // namespace content 420 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698