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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_capturer_proxy.h
diff --git a/remoting/host/desktop_capturer_proxy.h b/remoting/host/desktop_capturer_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6fc867b87b43859ae4a7625b6ab134e0e5bbf69
--- /dev/null
+++ b/remoting/host/desktop_capturer_proxy.h
@@ -0,0 +1,55 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
+#define REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace remoting {
+
+namespace protocol {
+class CursorShapeInfo;
+} // namespace protocol
+
+// DesktopCapturerProxy is responsible for calling webrtc::DesktopCapturer on
+// the capturer thread and then returning results to the caller's thread.
+class DesktopCapturerProxy : public webrtc::DesktopCapturer {
+ public:
+ DesktopCapturerProxy(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_ptr<webrtc::DesktopCapturer> capturer);
+ ~DesktopCapturerProxy() override;
+
+ // webrtc::DesktopCapturer interface.
+ void Start(Callback* callback) override;
+ void Capture(const webrtc::DesktopRegion& rect) override;
+
+ private:
+ class Core;
+
+ void OnFrameCaptured(scoped_ptr<webrtc::DesktopFrame> frame);
+
+ base::ThreadChecker thread_checker_;
+
+ scoped_ptr<Core> core_;
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
+ webrtc::DesktopCapturer::Callback* callback_;
+
+ base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_DESKTOP_CAPTURER_PROXY_H_
« 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