Chromium Code Reviews| Index: remoting/host/window_capturer_screen_wrapper.h |
| diff --git a/remoting/host/window_capturer_screen_wrapper.h b/remoting/host/window_capturer_screen_wrapper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c76e31f7b148d1417205a114ff739f73bd102f3e |
| --- /dev/null |
| +++ b/remoting/host/window_capturer_screen_wrapper.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
| +#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" |
| + |
| +namespace webrtc { |
| +class WindowCapturer; |
| +} |
| + |
| +namespace remoting { |
| + |
| +// This class wraps a WindowCapturer instance. The reason we do this |
| +// 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.
|
| +// Instead of adding support for a window_capturer_interface, which |
| +// is not really needed, we simply wrap a WindowCapturer inside of a |
| +// ScreenCapturer and delegate messages sent to this class to the |
| +// wrapped WindowCapturer. |
| +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.
|
| + public: |
| + WindowCapturerScreenWrapper( |
| + scoped_ptr<webrtc::WindowCapturer> window_capturer); |
| + virtual ~WindowCapturerScreenWrapper(); |
|
Lambros
2014/08/05 22:47:25
nit: one space
ronakvora do not use
2014/08/06 20:56:20
Done.
|
| + |
| + // webrtc::ScreenCapturer interface. |
| + virtual void Start(DesktopCapturer::Callback* callback) OVERRIDE; |
| + virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE; |
| + virtual void SetMouseShapeObserver( |
| + MouseShapeObserver* mouse_shape_observer) OVERRIDE; |
| + virtual bool GetScreenList(ScreenList* screens) OVERRIDE; |
| + virtual bool SelectScreen(webrtc::ScreenId id) OVERRIDE; |
| + |
| + private: |
| + scoped_ptr<webrtc::WindowCapturer> window_capturer_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WindowCapturerScreenWrapper); |
| +}; |
| + |
| + |
| +} // namespace remoting |