OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/memory/scoped_ptr.h" | |
6 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | |
7 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | |
8 | |
9 namespace webrtc { | |
10 class WindowCapturer; | |
11 } | |
12 | |
13 namespace remoting { | |
14 | |
15 // This class wraps a WindowCapturer instance. The reason we do this | |
16 // is becaues the remoting_me2me_host uses a screen capturer interface. | |
Lambros
2014/08/05 22:47:25
typo: because
ronakvora do not use
2014/08/06 20:56:20
Done.
| |
17 // Instead of adding support for a window_capturer_interface, which | |
18 // is not really needed, we simply wrap a WindowCapturer inside of a | |
19 // ScreenCapturer and delegate messages sent to this class to the | |
20 // wrapped WindowCapturer. | |
21 class WindowCapturerScreenWrapper : public webrtc::ScreenCapturer { | |
Wez
2014/08/06 04:10:16
Suggest WindowToScreenCapturerAdapter
Wez
2014/08/06 04:10:16
Note that we should have the change landed within
ronakvora do not use
2014/08/06 20:56:20
I'll just leave it for now since it is going to be
ronakvora do not use
2014/08/06 20:56:20
Acknowledged.
| |
22 public: | |
23 WindowCapturerScreenWrapper( | |
24 scoped_ptr<webrtc::WindowCapturer> window_capturer); | |
25 virtual ~WindowCapturerScreenWrapper(); | |
Lambros
2014/08/05 22:47:25
nit: one space
ronakvora do not use
2014/08/06 20:56:20
Done.
| |
26 | |
27 // webrtc::ScreenCapturer interface. | |
28 virtual void Start(DesktopCapturer::Callback* callback) OVERRIDE; | |
29 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE; | |
30 virtual void SetMouseShapeObserver( | |
31 MouseShapeObserver* mouse_shape_observer) OVERRIDE; | |
32 virtual bool GetScreenList(ScreenList* screens) OVERRIDE; | |
33 virtual bool SelectScreen(webrtc::ScreenId id) OVERRIDE; | |
34 | |
35 private: | |
36 scoped_ptr<webrtc::WindowCapturer> window_capturer_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(WindowCapturerScreenWrapper); | |
39 }; | |
40 | |
41 | |
42 } // namespace remoting | |
OLD | NEW |