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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.h

Issue 974513002: content: Split out VideoCaptureMachine from DesktopCaptureDeviceAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to AuraCaptureMachine and move to own file 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
Index: content/browser/media/capture/desktop_capture_device_aura.h
diff --git a/content/browser/media/capture/desktop_capture_device_aura.h b/content/browser/media/capture/desktop_capture_device_aura.h
index 8f3540a7fd6f4b2887525917273ae2531877668a..0cf1fdd438a0cced36d401f7b039ad57d189600e 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.h
+++ b/content/browser/media/capture/desktop_capture_device_aura.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "content/public/browser/desktop_media_id.h"
#include "media/video/capture/video_capture_device.h"
@@ -19,10 +20,12 @@ class Window;
namespace content {
class ContentVideoCaptureDeviceCore;
+class AuraWindowCaptureMachine;
// An implementation of VideoCaptureDevice that mirrors an Aura window.
class CONTENT_EXPORT DesktopCaptureDeviceAura
- : public media::VideoCaptureDevice {
+ : public media::VideoCaptureDevice,
+ public base::SupportsWeakPtr<DesktopCaptureDeviceAura> {
Sergey Ulanov 2015/03/04 01:54:03 Please use WeakPtrFactory<> as a member instead of
public:
// Creates a VideoCaptureDevice for the Aura desktop.
static media::VideoCaptureDevice* Create(const DesktopMediaID& source);
@@ -35,8 +38,11 @@ class CONTENT_EXPORT DesktopCaptureDeviceAura
void StopAndDeAllocate() override;
private:
- DesktopCaptureDeviceAura(const DesktopMediaID& source);
+ DesktopCaptureDeviceAura();
+ void SetWindow(const DesktopMediaID& source);
+ // machine_ is owned by core_.
+ AuraWindowCaptureMachine* machine_;
const scoped_ptr<class ContentVideoCaptureDeviceCore> core_;
DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDeviceAura);

Powered by Google App Engine
This is Rietveld 408576698