Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / host / shaped_desktop_capturer.h
bloba49743928aad45c677e8f057d8bf3553831856d6
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.
5 #ifndef REMOTING_HOST_SHAPED_DESKTOP_CAPTURER_H_
6 #define REMOTING_HOST_SHAPED_DESKTOP_CAPTURER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
11 namespace remoting {
13 class DesktopShapeTracker;
15 // Screen capturer that also captures desktop shape.
16 class ShapedDesktopCapturer : public webrtc::DesktopCapturer,
17 public webrtc::DesktopCapturer::Callback {
18 public:
19 ShapedDesktopCapturer(scoped_ptr<webrtc::DesktopCapturer> screen_capturer,
20 scoped_ptr<DesktopShapeTracker> shape_tracker);
21 virtual ~ShapedDesktopCapturer();
23 // webrtc::DesktopCapturer interface.
24 virtual void Start(webrtc::DesktopCapturer::Callback* callback) OVERRIDE;
25 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE;
27 private:
28 // webrtc::DesktopCapturer::Callback interface.
29 virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
30 virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) OVERRIDE;
32 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer_;
33 scoped_ptr<DesktopShapeTracker> shape_tracker_;
34 webrtc::DesktopCapturer::Callback* callback_;
36 DISALLOW_COPY_AND_ASSIGN(ShapedDesktopCapturer);
39 } // namespace remoting
41 #endif // REMOTING_HOST_SHAPED_DESKTOP_CAPTURER_H_