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 because the remoting_me2me_host uses a screen capturer interface. |
| 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 { |
| 22 public: |
| 23 WindowCapturerScreenWrapper( |
| 24 scoped_ptr<webrtc::WindowCapturer> window_capturer); |
| 25 virtual ~WindowCapturerScreenWrapper(); |
| 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 |