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 25 matching lines...) Expand all Loading... |
36 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h" | 36 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h" |
37 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" | 37 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h" |
38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
39 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
40 #include "wtf/text/WTFString.h" | 40 #include "wtf/text/WTFString.h" |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 class Dictionary; | 44 class Dictionary; |
45 class Document; | 45 class Document; |
46 class ExceptionState; | |
47 class MediaConstraints; | 46 class MediaConstraints; |
48 class MediaConstraintsImpl; | 47 class MediaConstraintsImpl; |
49 class MediaStreamDescriptor; | 48 class MediaStreamDescriptor; |
50 class UserMediaController; | 49 class UserMediaController; |
51 | 50 |
| 51 typedef int ExceptionCode; |
| 52 |
52 class UserMediaRequest : public RefCounted<UserMediaRequest>, public ContextLife
cycleObserver { | 53 class UserMediaRequest : public RefCounted<UserMediaRequest>, public ContextLife
cycleObserver { |
53 public: | 54 public: |
54 static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMedi
aController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCal
lback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionState&); | 55 static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMedi
aController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCal
lback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&); |
55 ~UserMediaRequest(); | 56 ~UserMediaRequest(); |
56 | 57 |
57 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes
sCallback.get(); } | 58 NavigatorUserMediaSuccessCallback* successCallback() const { return m_succes
sCallback.get(); } |
58 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb
ack.get(); } | 59 NavigatorUserMediaErrorCallback* errorCallback() const { return m_errorCallb
ack.get(); } |
59 Document* ownerDocument(); | 60 Document* ownerDocument(); |
60 | 61 |
61 void start(); | 62 void start(); |
62 | 63 |
63 void succeed(PassRefPtr<MediaStreamDescriptor>); | 64 void succeed(PassRefPtr<MediaStreamDescriptor>); |
64 void fail(const String& description); | 65 void fail(const String& description); |
(...skipping 15 matching lines...) Expand all Loading... |
80 | 81 |
81 UserMediaController* m_controller; | 82 UserMediaController* m_controller; |
82 | 83 |
83 RefPtr<NavigatorUserMediaSuccessCallback> m_successCallback; | 84 RefPtr<NavigatorUserMediaSuccessCallback> m_successCallback; |
84 RefPtr<NavigatorUserMediaErrorCallback> m_errorCallback; | 85 RefPtr<NavigatorUserMediaErrorCallback> m_errorCallback; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace WebCore | 88 } // namespace WebCore |
88 | 89 |
89 #endif // UserMediaRequest_h | 90 #endif // UserMediaRequest_h |
OLD | NEW |