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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // webrtc::DesktopCapturer interface. | 39 // webrtc::DesktopCapturer interface. |
40 void Start(Callback* callback) override; | 40 void Start(Callback* callback) override; |
41 void SetSharedMemoryFactory(std::unique_ptr<webrtc::SharedMemoryFactory> | 41 void SetSharedMemoryFactory(std::unique_ptr<webrtc::SharedMemoryFactory> |
42 shared_memory_factory) override; | 42 shared_memory_factory) override; |
43 void Capture(const webrtc::DesktopRegion& rect) override; | 43 void Capture(const webrtc::DesktopRegion& rect) override; |
44 | 44 |
45 private: | 45 private: |
46 class Core; | 46 class Core; |
47 | 47 |
48 void OnFrameCaptured(std::unique_ptr<webrtc::DesktopFrame> frame); | 48 void OnFrameCaptured(webrtc::DesktopCapturer::Result result, |
| 49 std::unique_ptr<webrtc::DesktopFrame> frame); |
49 | 50 |
50 base::ThreadChecker thread_checker_; | 51 base::ThreadChecker thread_checker_; |
51 | 52 |
52 std::unique_ptr<Core> core_; | 53 std::unique_ptr<Core> core_; |
53 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; | 54 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; |
54 webrtc::DesktopCapturer::Callback* callback_; | 55 webrtc::DesktopCapturer::Callback* callback_; |
55 | 56 |
56 base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_; | 57 base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); | 59 DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); |
59 }; | 60 }; |
60 | 61 |
61 } // namespace remoting | 62 } // namespace remoting |
62 | 63 |
63 #endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ | 64 #endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_ |
OLD | NEW |