| 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 27 matching lines...) Expand all  Loading... | 
|  38 namespace WebCore { |  38 namespace WebCore { | 
|  39  |  39  | 
|  40 NavigatorMediaStream::NavigatorMediaStream() |  40 NavigatorMediaStream::NavigatorMediaStream() | 
|  41 { |  41 { | 
|  42 } |  42 } | 
|  43  |  43  | 
|  44 NavigatorMediaStream::~NavigatorMediaStream() |  44 NavigatorMediaStream::~NavigatorMediaStream() | 
|  45 { |  45 { | 
|  46 } |  46 } | 
|  47  |  47  | 
|  48 void NavigatorMediaStream::webkitGetUserMedia(Navigator* navigator, const Dictio
    nary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, Pa
    ssRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& excepti
    onState) |  48 void NavigatorMediaStream::webkitGetUserMedia(Navigator* navigator, const Dictio
    nary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback> successCallback, Pa
    ssOwnPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& excepti
    onState) | 
|  49 { |  49 { | 
|  50     if (!successCallback) |  50     if (!successCallback) | 
|  51         return; |  51         return; | 
|  52  |  52  | 
|  53     UserMediaController* userMedia = UserMediaController::from(navigator->frame(
    ) ? navigator->frame()->page() : 0); |  53     UserMediaController* userMedia = UserMediaController::from(navigator->frame(
    ) ? navigator->frame()->page() : 0); | 
|  54     if (!userMedia) { |  54     if (!userMedia) { | 
|  55         exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
    r); |  55         exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
    r); | 
|  56         return; |  56         return; | 
|  57     } |  57     } | 
|  58  |  58  | 
|  59     RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame
    ()->document(), userMedia, options, successCallback, errorCallback, exceptionSta
    te); |  59     RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame
    ()->document(), userMedia, options, successCallback, errorCallback, exceptionSta
    te); | 
|  60     if (!request) { |  60     if (!request) { | 
|  61         exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
    r); |  61         exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro
    r); | 
|  62         return; |  62         return; | 
|  63     } |  63     } | 
|  64  |  64  | 
|  65     request->start(); |  65     request->start(); | 
|  66 } |  66 } | 
|  67  |  67  | 
|  68 } // namespace WebCore |  68 } // namespace WebCore | 
| OLD | NEW |