Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: remoting/host/desktop_capturer_proxy.h

Issue 883673004: Cleanup VideoFramePump. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_scheduler
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/desktop_capturer_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
6 #define REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
7
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/thread_checker.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
13
14 namespace base {
15 class SingleThreadTaskRunner;
16 } // namespace base
17
18 namespace remoting {
19
20 namespace protocol {
21 class CursorShapeInfo;
22 } // namespace protocol
23
24 // DesktopCapturerProxy is responsible for calling webrtc::DesktopCapturer on
25 // the capturer thread and then returning results to the caller's thread.
26 class DesktopCapturerProxy : public webrtc::DesktopCapturer {
27 public:
28 DesktopCapturerProxy(
29 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
30 scoped_ptr<webrtc::DesktopCapturer> capturer);
31 ~DesktopCapturerProxy() override;
32
33 // webrtc::DesktopCapturer interface.
34 void Start(Callback* callback) override;
35 void Capture(const webrtc::DesktopRegion& rect) override;
36
37 private:
38 class Core;
39
40 void OnFrameCaptured(scoped_ptr<webrtc::DesktopFrame> frame);
41
42 base::ThreadChecker thread_checker_;
43
44 scoped_ptr<Core> core_;
45 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
46 webrtc::DesktopCapturer::Callback* callback_;
47
48 base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_;
49
50 DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy);
51 };
52
53 } // namespace remoting
54
55 #endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/desktop_capturer_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698