OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 static PassRefPtrWillBeRawPtr<MIDIAccessPromise> create(ExecutionContext*, c
onst Dictionary&); | 55 static PassRefPtrWillBeRawPtr<MIDIAccessPromise> create(ExecutionContext*, c
onst Dictionary&); |
56 virtual ~MIDIAccessPromise(); | 56 virtual ~MIDIAccessPromise(); |
57 | 57 |
58 // ActiveDOMObject | 58 // ActiveDOMObject |
59 virtual bool hasPendingActivity() const OVERRIDE; | 59 virtual bool hasPendingActivity() const OVERRIDE; |
60 virtual void stop() OVERRIDE; | 60 virtual void stop() OVERRIDE; |
61 | 61 |
62 MIDIOptions* options() { return m_options.get(); } | 62 MIDIOptions* options() { return m_options.get(); } |
63 | 63 |
64 void fulfill(); | 64 void fulfill(); |
65 void reject(PassRefPtr<DOMError>); | 65 void reject(PassRefPtrWillBeRawPtr<DOMError>); |
66 | 66 |
67 void then(PassOwnPtr<MIDISuccessCallback>, PassOwnPtr<MIDIErrorCallback>); | 67 void then(PassOwnPtr<MIDISuccessCallback>, PassOwnPtr<MIDIErrorCallback>); |
68 | 68 |
69 void trace(Visitor*); | 69 void trace(Visitor*); |
70 | 70 |
71 private: | 71 private: |
72 enum State { | 72 enum State { |
73 Pending, | 73 Pending, |
74 Accepted, | 74 Accepted, |
75 Rejected, | 75 Rejected, |
76 Invoked, | 76 Invoked, |
77 }; | 77 }; |
78 | 78 |
79 MIDIAccessPromise(ExecutionContext*, const Dictionary&); | 79 MIDIAccessPromise(ExecutionContext*, const Dictionary&); |
80 | 80 |
81 void clear(); | 81 void clear(); |
82 | 82 |
83 State m_state; | 83 State m_state; |
84 OwnPtr<MIDISuccessCallback> m_successCallback; | 84 OwnPtr<MIDISuccessCallback> m_successCallback; |
85 OwnPtr<MIDIErrorCallback> m_errorCallback; | 85 OwnPtr<MIDIErrorCallback> m_errorCallback; |
86 OwnPtr<MIDIOptions> m_options; | 86 OwnPtr<MIDIOptions> m_options; |
87 RefPtr<DOMError> m_error; | 87 RefPtrWillBeMember<DOMError> m_error; |
88 RefPtrWillBeMember<MIDIAccess> m_access; | 88 RefPtrWillBeMember<MIDIAccess> m_access; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace WebCore | 91 } // namespace WebCore |
92 | 92 |
93 #endif // MIDIAccessPromise_h | 93 #endif // MIDIAccessPromise_h |
OLD | NEW |