| 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 "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 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_shape.h" | 9 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_shape.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 desktop_session_proxy_->SetVideoCapturer(weak_factory_.GetWeakPtr()); | 29 desktop_session_proxy_->SetVideoCapturer(weak_factory_.GetWeakPtr()); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void IpcVideoFrameCapturer::SetMouseShapeObserver( | 32 void IpcVideoFrameCapturer::SetMouseShapeObserver( |
| 33 MouseShapeObserver* mouse_shape_observer) { | 33 MouseShapeObserver* mouse_shape_observer) { |
| 34 DCHECK(!mouse_shape_observer_); | 34 DCHECK(!mouse_shape_observer_); |
| 35 DCHECK(mouse_shape_observer); | 35 DCHECK(mouse_shape_observer); |
| 36 mouse_shape_observer_ = mouse_shape_observer; | 36 mouse_shape_observer_ = mouse_shape_observer; |
| 37 } | 37 } |
| 38 | 38 |
| 39 bool IpcVideoFrameCapturer::GetScreenList(ScreenList* screens) { |
| 40 NOTIMPLEMENTED(); |
| 41 return false; |
| 42 } |
| 43 |
| 44 bool IpcVideoFrameCapturer::SelectScreen(webrtc::ScreenId id) { |
| 45 NOTIMPLEMENTED(); |
| 46 return false; |
| 47 } |
| 48 |
| 39 void IpcVideoFrameCapturer::Capture(const webrtc::DesktopRegion& region) { | 49 void IpcVideoFrameCapturer::Capture(const webrtc::DesktopRegion& region) { |
| 40 DCHECK(!capture_pending_); | 50 DCHECK(!capture_pending_); |
| 41 capture_pending_ = true; | 51 capture_pending_ = true; |
| 42 desktop_session_proxy_->CaptureFrame(); | 52 desktop_session_proxy_->CaptureFrame(); |
| 43 } | 53 } |
| 44 | 54 |
| 45 void IpcVideoFrameCapturer::OnCaptureCompleted( | 55 void IpcVideoFrameCapturer::OnCaptureCompleted( |
| 46 scoped_ptr<webrtc::DesktopFrame> frame) { | 56 scoped_ptr<webrtc::DesktopFrame> frame) { |
| 47 DCHECK(capture_pending_); | 57 DCHECK(capture_pending_); |
| 48 capture_pending_ = false; | 58 capture_pending_ = false; |
| 49 callback_->OnCaptureCompleted(frame.release()); | 59 callback_->OnCaptureCompleted(frame.release()); |
| 50 } | 60 } |
| 51 | 61 |
| 52 void IpcVideoFrameCapturer::OnCursorShapeChanged( | 62 void IpcVideoFrameCapturer::OnCursorShapeChanged( |
| 53 scoped_ptr<webrtc::MouseCursorShape> cursor_shape) { | 63 scoped_ptr<webrtc::MouseCursorShape> cursor_shape) { |
| 54 if (mouse_shape_observer_) | 64 if (mouse_shape_observer_) |
| 55 mouse_shape_observer_->OnCursorShapeChanged(cursor_shape.release()); | 65 mouse_shape_observer_->OnCursorShapeChanged(cursor_shape.release()); |
| 56 } | 66 } |
| 57 | 67 |
| 58 } // namespace remoting | 68 } // namespace remoting |
| OLD | NEW |