Index: Source/modules/mediastream/NavigatorMediaStream.cpp |
diff --git a/Source/modules/mediastream/NavigatorMediaStream.cpp b/Source/modules/mediastream/NavigatorMediaStream.cpp |
index a5e3d4b7c5416fb318ecb734c0a0d6bb3414497a..4fd9604bb4c2dab6771f7c56d3c182915a95f5f6 100644 |
--- a/Source/modules/mediastream/NavigatorMediaStream.cpp |
+++ b/Source/modules/mediastream/NavigatorMediaStream.cpp |
@@ -30,6 +30,8 @@ |
#include "core/frame/Frame.h" |
#include "core/frame/Navigator.h" |
#include "core/page/Page.h" |
+#include "modules/mediastream/MediaDeviceInfoCallback.h" |
+#include "modules/mediastream/MediaDevicesRequest.h" |
#include "modules/mediastream/NavigatorUserMediaErrorCallback.h" |
#include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" |
#include "modules/mediastream/UserMediaController.h" |
@@ -65,4 +67,21 @@ void NavigatorMediaStream::webkitGetUserMedia(Navigator* navigator, const Dictio |
request->start(); |
} |
+void NavigatorMediaStream::getMediaDevices(Navigator* navigator, PassOwnPtr<MediaDeviceInfoCallback> callback, ExceptionState& exceptionState) |
+{ |
+ UserMediaController* userMedia = UserMediaController::from(navigator->frame() ? navigator->frame()->page() : 0); |
+ if (!userMedia) { |
+ exceptionState.throwDOMException(NotSupportedError, "Not implemented."); |
+ return; |
+ } |
+ |
+ RefPtr<MediaDevicesRequest> request = MediaDevicesRequest::create(navigator->frame()->document(), userMedia, callback, exceptionState); |
+ if (!request) { |
+ exceptionState.throwDOMException(NotSupportedError, "Not implemented."); |
+ return; |
+ } |
+ |
+ request->start(); |
+} |
+ |
} // namespace WebCore |