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

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

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/ipc_util_win.cc ('k') | remoting/host/it2me/it2me_native_messaging_host.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/ipc_video_frame_capturer.h" 5 #include "remoting/host/ipc_video_frame_capturer.h"
6 6
7 #include "remoting/host/desktop_session_proxy.h" 7 #include "remoting/host/desktop_session_proxy.h"
8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 IpcVideoFrameCapturer::IpcVideoFrameCapturer( 12 IpcVideoFrameCapturer::IpcVideoFrameCapturer(
13 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) 13 scoped_refptr<DesktopSessionProxy> desktop_session_proxy)
14 : callback_(NULL), 14 : callback_(nullptr),
15 desktop_session_proxy_(desktop_session_proxy), 15 desktop_session_proxy_(desktop_session_proxy),
16 capture_pending_(false), 16 capture_pending_(false),
17 weak_factory_(this) { 17 weak_factory_(this) {
18 } 18 }
19 19
20 IpcVideoFrameCapturer::~IpcVideoFrameCapturer() { 20 IpcVideoFrameCapturer::~IpcVideoFrameCapturer() {
21 } 21 }
22 22
23 void IpcVideoFrameCapturer::Start(Callback* callback) { 23 void IpcVideoFrameCapturer::Start(Callback* callback) {
24 DCHECK(!callback_); 24 DCHECK(!callback_);
25 DCHECK(callback); 25 DCHECK(callback);
26 callback_ = callback; 26 callback_ = callback;
27 desktop_session_proxy_->SetVideoCapturer(weak_factory_.GetWeakPtr()); 27 desktop_session_proxy_->SetVideoCapturer(weak_factory_.GetWeakPtr());
28 } 28 }
29 29
30 void IpcVideoFrameCapturer::Capture(const webrtc::DesktopRegion& region) { 30 void IpcVideoFrameCapturer::Capture(const webrtc::DesktopRegion& region) {
31 DCHECK(!capture_pending_); 31 DCHECK(!capture_pending_);
32 capture_pending_ = true; 32 capture_pending_ = true;
33 desktop_session_proxy_->CaptureFrame(); 33 desktop_session_proxy_->CaptureFrame();
34 } 34 }
35 35
36 void IpcVideoFrameCapturer::OnCaptureCompleted( 36 void IpcVideoFrameCapturer::OnCaptureCompleted(
37 scoped_ptr<webrtc::DesktopFrame> frame) { 37 scoped_ptr<webrtc::DesktopFrame> frame) {
38 DCHECK(capture_pending_); 38 DCHECK(capture_pending_);
39 capture_pending_ = false; 39 capture_pending_ = false;
40 callback_->OnCaptureCompleted(frame.release()); 40 callback_->OnCaptureCompleted(frame.release());
41 } 41 }
42 42
43 } // namespace remoting 43 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_util_win.cc ('k') | remoting/host/it2me/it2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698