OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 static PassRefPtr<UserMediaRequest> create(ExecutionContext*, UserMediaContr
oller*, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback>
, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&); | 53 static PassRefPtr<UserMediaRequest> create(ExecutionContext*, UserMediaContr
oller*, const Dictionary& options, PassOwnPtr<NavigatorUserMediaSuccessCallback>
, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&); |
54 virtual ~UserMediaRequest(); | 54 virtual ~UserMediaRequest(); |
55 | 55 |
56 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes
sCallback.get(); } | 56 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes
sCallback.get(); } |
57 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb
ack.get(); } | 57 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb
ack.get(); } |
58 Document* ownerDocument(); | 58 Document* ownerDocument(); |
59 | 59 |
60 void start(); | 60 void start(); |
61 | 61 |
62 void succeed(PassRefPtr<MediaStreamDescriptor>); | 62 void succeed(PassRefPtr<MediaStreamDescriptor>); |
63 void fail(const String& description); | 63 void failPermissionDenied(const String& message); |
64 void failConstraint(const String& constraintName, const String& description)
; | 64 void failConstraint(const String& constraintName, const String& message); |
| 65 void failUASpecific(const String& name, const String& message, const String&
constraintName); |
65 | 66 |
66 bool audio() const; | 67 bool audio() const; |
67 bool video() const; | 68 bool video() const; |
68 blink::WebMediaConstraints audioConstraints() const; | 69 blink::WebMediaConstraints audioConstraints() const; |
69 blink::WebMediaConstraints videoConstraints() const; | 70 blink::WebMediaConstraints videoConstraints() const; |
70 | 71 |
71 // ContextLifecycleObserver | 72 // ContextLifecycleObserver |
72 virtual void contextDestroyed() OVERRIDE; | 73 virtual void contextDestroyed() OVERRIDE; |
73 | 74 |
74 private: | 75 private: |
75 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon
straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS
uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>); | 76 UserMediaRequest(ExecutionContext*, UserMediaController*, blink::WebMediaCon
straints audio, blink::WebMediaConstraints video, PassOwnPtr<NavigatorUserMediaS
uccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>); |
76 | 77 |
77 blink::WebMediaConstraints m_audio; | 78 blink::WebMediaConstraints m_audio; |
78 blink::WebMediaConstraints m_video; | 79 blink::WebMediaConstraints m_video; |
79 | 80 |
80 UserMediaController* m_controller; | 81 UserMediaController* m_controller; |
81 | 82 |
82 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback; | 83 OwnPtr<NavigatorUserMediaSuccessCallback> m_successCallback; |
83 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback; | 84 OwnPtr<NavigatorUserMediaErrorCallback> m_errorCallback; |
84 }; | 85 }; |
85 | 86 |
86 } // namespace WebCore | 87 } // namespace WebCore |
87 | 88 |
88 #endif // UserMediaRequest_h | 89 #endif // UserMediaRequest_h |
OLD | NEW |