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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 static PassRefPtrWillBeRawPtr<MIDIAccessPromise> create(ExecutionContext*, c
onst Dictionary&); | 54 static PassRefPtrWillBeRawPtr<MIDIAccessPromise> create(ExecutionContext*, c
onst Dictionary&); |
55 virtual ~MIDIAccessPromise(); | 55 virtual ~MIDIAccessPromise(); |
56 | 56 |
57 // ActiveDOMObject | 57 // ActiveDOMObject |
58 virtual bool hasPendingActivity() const OVERRIDE; | 58 virtual bool hasPendingActivity() const OVERRIDE; |
59 virtual void stop() OVERRIDE; | 59 virtual void stop() OVERRIDE; |
60 | 60 |
61 MIDIOptions* options() { return m_options.get(); } | 61 MIDIOptions* options() { return m_options.get(); } |
62 | 62 |
63 void fulfill(); | 63 void fulfill(); |
64 void reject(PassRefPtr<DOMError>); | 64 void reject(PassRefPtrWillBeRawPtr<DOMError>); |
65 | 65 |
66 void then(PassOwnPtr<MIDISuccessCallback>, PassOwnPtr<MIDIErrorCallback>); | 66 void then(PassOwnPtr<MIDISuccessCallback>, PassOwnPtr<MIDIErrorCallback>); |
67 | 67 |
68 void trace(Visitor*); | 68 void trace(Visitor*); |
69 | 69 |
70 private: | 70 private: |
71 enum State { | 71 enum State { |
72 Pending, | 72 Pending, |
73 Accepted, | 73 Accepted, |
74 Rejected, | 74 Rejected, |
75 Invoked, | 75 Invoked, |
76 }; | 76 }; |
77 | 77 |
78 MIDIAccessPromise(ExecutionContext*, const Dictionary&); | 78 MIDIAccessPromise(ExecutionContext*, const Dictionary&); |
79 | 79 |
80 void clear(); | 80 void clear(); |
81 | 81 |
82 State m_state; | 82 State m_state; |
83 OwnPtr<MIDISuccessCallback> m_successCallback; | 83 OwnPtr<MIDISuccessCallback> m_successCallback; |
84 OwnPtr<MIDIErrorCallback> m_errorCallback; | 84 OwnPtr<MIDIErrorCallback> m_errorCallback; |
85 OwnPtr<MIDIOptions> m_options; | 85 OwnPtr<MIDIOptions> m_options; |
86 RefPtr<DOMError> m_error; | 86 RefPtrWillBeMember<DOMError> m_error; |
87 RefPtrWillBeMember<MIDIAccess> m_access; | 87 RefPtrWillBeMember<MIDIAccess> m_access; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace WebCore | 90 } // namespace WebCore |
91 | 91 |
92 #endif // MIDIAccessPromise_h | 92 #endif // MIDIAccessPromise_h |
OLD | NEW |