| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 2000 Harri Porten (porten@kde.org) |
| 3 * Copyright (c) 2000 Daniel Molkentin (molkentin@kde.org) | 3 * Copyright (c) 2000 Daniel Molkentin (molkentin@kde.org) |
| 4 * Copyright (c) 2000 Stefan Schimanski (schimmi@kde.org) | 4 * Copyright (c) 2000 Stefan Schimanski (schimmi@kde.org) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "config.h" | 23 #include "config.h" |
| 24 #include "modules/mediastream/NavigatorMediaStream.h" | 24 #include "modules/mediastream/NavigatorMediaStream.h" |
| 25 | 25 |
| 26 #include "bindings/v8/Dictionary.h" | 26 #include "bindings/v8/Dictionary.h" |
| 27 #include "bindings/v8/ExceptionState.h" | 27 #include "bindings/v8/ExceptionState.h" |
| 28 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
| 29 #include "core/dom/ExceptionCode.h" | 29 #include "core/dom/ExceptionCode.h" |
| 30 #include "core/frame/Frame.h" | 30 #include "core/frame/Frame.h" |
| 31 #include "core/frame/Navigator.h" | 31 #include "core/frame/Navigator.h" |
| 32 #include "core/page/Page.h" | 32 #include "core/page/Page.h" |
| 33 #include "modules/mediastream/MediaDeviceInfoCallback.h" |
| 34 #include "modules/mediastream/MediaDevicesRequest.h" |
| 33 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h" | 35 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h" |
| 34 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" | 36 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" |
| 35 #include "modules/mediastream/UserMediaController.h" | 37 #include "modules/mediastream/UserMediaController.h" |
| 36 #include "modules/mediastream/UserMediaRequest.h" | 38 #include "modules/mediastream/UserMediaRequest.h" |
| 37 | 39 |
| 38 namespace WebCore { | 40 namespace WebCore { |
| 39 | 41 |
| 40 NavigatorMediaStream::NavigatorMediaStream() | 42 NavigatorMediaStream::NavigatorMediaStream() |
| 41 { | 43 { |
| 42 } | 44 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 58 | 60 |
| 59 RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame
()->document(), userMedia, options, successCallback, errorCallback, exceptionSta
te); | 61 RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame
()->document(), userMedia, options, successCallback, errorCallback, exceptionSta
te); |
| 60 if (!request) { | 62 if (!request) { |
| 61 exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
r); | 63 exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
r); |
| 62 return; | 64 return; |
| 63 } | 65 } |
| 64 | 66 |
| 65 request->start(); | 67 request->start(); |
| 66 } | 68 } |
| 67 | 69 |
| 70 void NavigatorMediaStream::getMediaDevices(Navigator* navigator, PassOwnPtr<Medi
aDeviceInfoCallback> callback, ExceptionState& exceptionState) |
| 71 { |
| 72 UserMediaController* userMedia = UserMediaController::from(navigator->frame(
) ? navigator->frame()->page() : 0); |
| 73 if (!userMedia) { |
| 74 exceptionState.throwDOMException(NotSupportedError, "Not implemented."); |
| 75 return; |
| 76 } |
| 77 |
| 78 RefPtr<MediaDevicesRequest> request = MediaDevicesRequest::create(navigator-
>frame()->document(), userMedia, callback, exceptionState); |
| 79 if (!request) { |
| 80 exceptionState.throwDOMException(NotSupportedError, "Not implemented."); |
| 81 return; |
| 82 } |
| 83 |
| 84 } |
| 85 |
| 68 } // namespace WebCore | 86 } // namespace WebCore |
| OLD | NEW |