OLD | NEW |
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 "media/video/capture/screen/mouse_cursor_shape.h" | |
8 #include "remoting/host/desktop_session_proxy.h" | 7 #include "remoting/host/desktop_session_proxy.h" |
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 8 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 9 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_shape.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 IpcVideoFrameCapturer::IpcVideoFrameCapturer( | 13 IpcVideoFrameCapturer::IpcVideoFrameCapturer( |
14 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) | 14 scoped_refptr<DesktopSessionProxy> desktop_session_proxy) |
15 : callback_(NULL), | 15 : callback_(NULL), |
16 mouse_shape_observer_(NULL), | 16 mouse_shape_observer_(NULL), |
17 desktop_session_proxy_(desktop_session_proxy), | 17 desktop_session_proxy_(desktop_session_proxy), |
18 capture_pending_(false), | 18 capture_pending_(false), |
19 weak_factory_(this) { | 19 weak_factory_(this) { |
(...skipping 23 matching lines...) Expand all Loading... |
43 } | 43 } |
44 | 44 |
45 void IpcVideoFrameCapturer::OnCaptureCompleted( | 45 void IpcVideoFrameCapturer::OnCaptureCompleted( |
46 scoped_ptr<webrtc::DesktopFrame> frame) { | 46 scoped_ptr<webrtc::DesktopFrame> frame) { |
47 DCHECK(capture_pending_); | 47 DCHECK(capture_pending_); |
48 capture_pending_ = false; | 48 capture_pending_ = false; |
49 callback_->OnCaptureCompleted(frame.release()); | 49 callback_->OnCaptureCompleted(frame.release()); |
50 } | 50 } |
51 | 51 |
52 void IpcVideoFrameCapturer::OnCursorShapeChanged( | 52 void IpcVideoFrameCapturer::OnCursorShapeChanged( |
53 scoped_ptr<media::MouseCursorShape> cursor_shape) { | 53 scoped_ptr<webrtc::MouseCursorShape> cursor_shape) { |
54 if (mouse_shape_observer_) | 54 if (mouse_shape_observer_) |
55 mouse_shape_observer_->OnCursorShapeChanged(cursor_shape.Pass()); | 55 mouse_shape_observer_->OnCursorShapeChanged(cursor_shape.release()); |
56 } | 56 } |
57 | 57 |
58 } // namespace remoting | 58 } // namespace remoting |
OLD | NEW |