OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "remoting/host/shaped_screen_capturer.h" | 5 #include "remoting/host/shaped_screen_capturer.h" |
6 | 6 |
| 7 #include "base/logging.h" |
7 #include "remoting/host/desktop_shape_tracker.h" | 8 #include "remoting/host/desktop_shape_tracker.h" |
8 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 9 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 | 13 |
13 // static | 14 // static |
14 scoped_ptr<ShapedScreenCapturer> ShapedScreenCapturer::Create( | 15 scoped_ptr<ShapedScreenCapturer> ShapedScreenCapturer::Create( |
15 webrtc::DesktopCaptureOptions options) { | 16 webrtc::DesktopCaptureOptions options) { |
16 return scoped_ptr<ShapedScreenCapturer>( | 17 return scoped_ptr<ShapedScreenCapturer>( |
(...skipping 19 matching lines...) Expand all Loading... |
36 | 37 |
37 void ShapedScreenCapturer::Capture(const webrtc::DesktopRegion& region) { | 38 void ShapedScreenCapturer::Capture(const webrtc::DesktopRegion& region) { |
38 screen_capturer_->Capture(region); | 39 screen_capturer_->Capture(region); |
39 } | 40 } |
40 | 41 |
41 void ShapedScreenCapturer::SetMouseShapeObserver( | 42 void ShapedScreenCapturer::SetMouseShapeObserver( |
42 MouseShapeObserver* mouse_shape_observer) { | 43 MouseShapeObserver* mouse_shape_observer) { |
43 screen_capturer_->SetMouseShapeObserver(mouse_shape_observer); | 44 screen_capturer_->SetMouseShapeObserver(mouse_shape_observer); |
44 } | 45 } |
45 | 46 |
| 47 bool ShapedScreenCapturer::GetScreenList(ScreenList* screens) { |
| 48 NOTIMPLEMENTED(); |
| 49 return false; |
| 50 } |
| 51 |
| 52 bool ShapedScreenCapturer::SelectScreen(webrtc::ScreenId id) { |
| 53 NOTIMPLEMENTED(); |
| 54 return false; |
| 55 } |
| 56 |
46 webrtc::SharedMemory* ShapedScreenCapturer::CreateSharedMemory(size_t size) { | 57 webrtc::SharedMemory* ShapedScreenCapturer::CreateSharedMemory(size_t size) { |
47 return callback_->CreateSharedMemory(size); | 58 return callback_->CreateSharedMemory(size); |
48 } | 59 } |
49 | 60 |
50 void ShapedScreenCapturer::OnCaptureCompleted(webrtc::DesktopFrame* frame) { | 61 void ShapedScreenCapturer::OnCaptureCompleted(webrtc::DesktopFrame* frame) { |
51 shape_tracker_->RefreshDesktopShape(); | 62 shape_tracker_->RefreshDesktopShape(); |
52 frame->set_shape(new webrtc::DesktopRegion(shape_tracker_->desktop_shape())); | 63 frame->set_shape(new webrtc::DesktopRegion(shape_tracker_->desktop_shape())); |
53 callback_->OnCaptureCompleted(frame); | 64 callback_->OnCaptureCompleted(frame); |
54 } | 65 } |
55 | 66 |
56 } // namespace remoting | 67 } // namespace remoting |
OLD | NEW |