OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DESKTOP_CAPTURER_PROXY_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ |
6 #define REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ | 6 #define REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 28 matching lines...) Expand all Loading... | |
39 // capturer thread. Alternatively the capturer can be passed to | 39 // capturer thread. Alternatively the capturer can be passed to |
40 // set_capturer(). | 40 // set_capturer(). |
41 void CreateCapturer(const webrtc::DesktopCaptureOptions& options); | 41 void CreateCapturer(const webrtc::DesktopCaptureOptions& options); |
42 void set_capturer(std::unique_ptr<webrtc::DesktopCapturer> capturer); | 42 void set_capturer(std::unique_ptr<webrtc::DesktopCapturer> capturer); |
43 | 43 |
44 // webrtc::DesktopCapturer interface. | 44 // webrtc::DesktopCapturer interface. |
45 void Start(Callback* callback) override; | 45 void Start(Callback* callback) override; |
46 void SetSharedMemoryFactory(std::unique_ptr<webrtc::SharedMemoryFactory> | 46 void SetSharedMemoryFactory(std::unique_ptr<webrtc::SharedMemoryFactory> |
47 shared_memory_factory) override; | 47 shared_memory_factory) override; |
48 void CaptureFrame() override; | 48 void CaptureFrame() override; |
49 // Following two functions are not supported, they always return false. | |
Sergey Ulanov
2016/11/05 00:16:26
Put this in the comment above class definition ple
Hzj_jie
2016/11/06 04:27:24
Done.
| |
50 bool GetSourceList(SourceList* sources) override; | |
51 bool SelectSource(SourceId id) override; | |
49 | 52 |
50 private: | 53 private: |
51 class Core; | 54 class Core; |
52 | 55 |
53 void OnFrameCaptured(webrtc::DesktopCapturer::Result result, | 56 void OnFrameCaptured(webrtc::DesktopCapturer::Result result, |
54 std::unique_ptr<webrtc::DesktopFrame> frame); | 57 std::unique_ptr<webrtc::DesktopFrame> frame); |
55 | 58 |
56 base::ThreadChecker thread_checker_; | 59 base::ThreadChecker thread_checker_; |
57 | 60 |
58 std::unique_ptr<Core> core_; | 61 std::unique_ptr<Core> core_; |
59 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; | 62 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; |
60 webrtc::DesktopCapturer::Callback* callback_; | 63 webrtc::DesktopCapturer::Callback* callback_; |
61 | 64 |
62 base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_; | 65 base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_; |
63 | 66 |
64 DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); | 67 DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); |
65 }; | 68 }; |
66 | 69 |
67 } // namespace remoting | 70 } // namespace remoting |
68 | 71 |
69 #endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ | 72 #endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ |
OLD | NEW |