| 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..4f00db298973a7db37fd079332f9ae25bb8b957d
|
| --- /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 because the remoting_me2me_host uses a screen capturer interface.
|
| +// 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 {
|
| + public:
|
| + WindowCapturerScreenWrapper(
|
| + scoped_ptr<webrtc::WindowCapturer> window_capturer);
|
| + virtual ~WindowCapturerScreenWrapper();
|
| +
|
| + // 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
|
|
|