OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ | 5 #ifndef REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ |
6 #define REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ | 6 #define REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // be rendered to a given data structure. Start() and Capture() must be called | 26 // be rendered to a given data structure. Start() and Capture() must be called |
27 // on the Browser UI thread. | 27 // on the Browser UI thread. |
28 class AuraDesktopCapturer : public webrtc::DesktopCapturer { | 28 class AuraDesktopCapturer : public webrtc::DesktopCapturer { |
29 public: | 29 public: |
30 AuraDesktopCapturer(); | 30 AuraDesktopCapturer(); |
31 ~AuraDesktopCapturer() override; | 31 ~AuraDesktopCapturer() override; |
32 | 32 |
33 // webrtc::DesktopCapturer implementation. | 33 // webrtc::DesktopCapturer implementation. |
34 void Start(webrtc::DesktopCapturer::Callback* callback) override; | 34 void Start(webrtc::DesktopCapturer::Callback* callback) override; |
35 void CaptureFrame() override; | 35 void CaptureFrame() override; |
| 36 bool GetSourceList(SourceList* sources) override; |
| 37 bool SelectSource(SourceId id) override; |
36 | 38 |
37 private: | 39 private: |
38 friend class AuraDesktopCapturerTest; | 40 friend class AuraDesktopCapturerTest; |
39 | 41 |
40 // Called when a copy of the layer is captured. | 42 // Called when a copy of the layer is captured. |
41 void OnFrameCaptured(std::unique_ptr<cc::CopyOutputResult> result); | 43 void OnFrameCaptured(std::unique_ptr<cc::CopyOutputResult> result); |
42 | 44 |
43 // Points to the callback passed to webrtc::DesktopCapturer::Start(). | 45 // Points to the callback passed to webrtc::DesktopCapturer::Start(). |
44 webrtc::DesktopCapturer::Callback* callback_; | 46 webrtc::DesktopCapturer::Callback* callback_; |
45 | 47 |
46 // The root window of the Aura Shell. | 48 // The root window of the Aura Shell. |
47 aura::Window* desktop_window_; | 49 aura::Window* desktop_window_; |
48 | 50 |
49 base::WeakPtrFactory<AuraDesktopCapturer> weak_factory_; | 51 base::WeakPtrFactory<AuraDesktopCapturer> weak_factory_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(AuraDesktopCapturer); | 53 DISALLOW_COPY_AND_ASSIGN(AuraDesktopCapturer); |
52 }; | 54 }; |
53 | 55 |
54 } // namespace remoting | 56 } // namespace remoting |
55 | 57 |
56 #endif // REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ | 58 #endif // REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_ |
OLD | NEW |