Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h |
| diff --git a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e5067dcac1712bd3ea86ea328b683bb9e57b513 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef RTCVoidRequestPromiseImpl_h |
| +#define RTCVoidRequestPromiseImpl_h |
| + |
| +#include "core/dom/ActiveDOMObject.h" |
| +#include "platform/heap/Handle.h" |
| +#include "platform/mediastream/RTCVoidRequest.h" |
| + |
| +namespace blink { |
| + |
| +class ScriptPromiseResolver; |
| +class RTCPeerConnection; |
| + |
| +class RTCVoidRequestPromiseImpl final : public RTCVoidRequest, public ActiveDOMObject { |
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCVoidRequestPromiseImpl); |
|
philipj_slow
2016/02/09 12:02:04
Looks like this class will only work with Oilpan,
Guido Urdaneta
2016/02/09 16:51:01
Done.
|
| +public: |
| + static RTCVoidRequestPromiseImpl* create(RTCPeerConnection*, ScriptPromiseResolver*, const String& errorName); |
| + ~RTCVoidRequestPromiseImpl() override; |
| + |
| + // RTCVoidRequest |
| + void requestSucceeded() override; |
| + void requestFailed(const String& error) override; |
|
philipj_slow
2016/02/09 12:02:04
This seems a bit strange, shouldn't the type of er
Guido Urdaneta
2016/02/09 16:51:01
Already explained by hta.
|
| + |
| + // ActiveDOMObject |
|
philipj_slow
2016/02/09 12:02:04
What happens if this is not an ActiveDOMObject and
Guido Urdaneta
2016/02/09 16:51:01
I removed the inheritance from ActiveDOMObject and
philipj_slow
2016/02/09 18:59:17
Makes sense!
|
| + void stop() override; |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| +private: |
| + RTCVoidRequestPromiseImpl(RTCPeerConnection*, ScriptPromiseResolver*, const String& errorName); |
| + |
| + void clear(); |
| + |
| + Member<ScriptPromiseResolver> m_resolver; |
| + String m_errorName; |
| + Member<RTCPeerConnection> m_requester; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // RTCVoidRequestPromiseImpl_h |