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: Source/modules/mediastream/MediaDevicesRequest.h

Issue 135363004: MediaStream API: Patch #1 of implementing navigator.getMediaDevices (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed year Created 6 years, 11 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: Source/modules/mediastream/MediaDevicesRequest.h
diff --git a/Source/platform/mediastream/MediaStreamTrackSourcesRequest.h b/Source/modules/mediastream/MediaDevicesRequest.h
similarity index 56%
copy from Source/platform/mediastream/MediaStreamTrackSourcesRequest.h
copy to Source/modules/mediastream/MediaDevicesRequest.h
index 61a0536ccced2197002e8498bfd48cad65ec8387..f99842d6a1f2f633464d10828fffee8e71c45888 100644
--- a/Source/platform/mediastream/MediaStreamTrackSourcesRequest.h
+++ b/Source/modules/mediastream/MediaDevicesRequest.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,43 +23,46 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MediaStreamTrackSourcesRequest_h
-#define MediaStreamTrackSourcesRequest_h
+#ifndef MediaDevicesRequest_h
+#define MediaDevicesRequest_h
-#include "public/platform/WebVector.h"
+#include "core/dom/ActiveDOMObject.h"
+#include "modules/mediastream/MediaDeviceInfo.h"
+#include "modules/mediastream/MediaDeviceInfoCallback.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
-#include "wtf/text/WTFString.h"
-
-namespace blink {
-class WebSourceInfo;
-}
namespace WebCore {
-class MediaStreamTrackSourcesRequest : public RefCounted<MediaStreamTrackSourcesRequest> {
+class Document;
+class ExceptionState;
+class MediaStreamDescriptor;
+class UserMediaController;
+
+class MediaDevicesRequest FINAL : public RefCounted<MediaDevicesRequest>, public ActiveDOMObject {
public:
- class ExtraData {
- public:
- virtual ~ExtraData() { }
- };
+ static PassRefPtr<MediaDevicesRequest> create(ExecutionContext*, UserMediaController*, PassOwnPtr<MediaDeviceInfoCallback>, ExceptionState&);
+ virtual ~MediaDevicesRequest();
- virtual ~MediaStreamTrackSourcesRequest() { }
+ MediaDeviceInfoCallback* callback() const { return m_callback.get(); }
+ Document* ownerDocument();
- virtual String origin() = 0;
- virtual void requestSucceeded(const blink::WebVector<blink::WebSourceInfo>&) = 0;
+ void start();
- ExtraData* extraData() const { return m_extraData.get(); }
- void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = extraData; }
+ void succeed(const MediaDeviceInfoVector&);
-protected:
- MediaStreamTrackSourcesRequest() { }
+ // ActiveDOMObject
+ virtual void stop() OVERRIDE;
private:
- OwnPtr<ExtraData> m_extraData;
+ MediaDevicesRequest(ExecutionContext*, UserMediaController*, PassOwnPtr<MediaDeviceInfoCallback>);
+
+ UserMediaController* m_controller;
+
+ OwnPtr<MediaDeviceInfoCallback> m_callback;
};
} // namespace WebCore
-#endif // MediaStreamTrackSourcesRequest_h
+#endif // MediaDevicesRequest_h
« no previous file with comments | « Source/modules/mediastream/MediaDeviceInfoCallback.h ('k') | Source/modules/mediastream/MediaDevicesRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698