Chromium Code Reviews| Index: Source/modules/audio_output_devices/SetSinkIdCallbacks.h |
| diff --git a/Source/modules/audio_output_devices/SetSinkIdCallbacks.h b/Source/modules/audio_output_devices/SetSinkIdCallbacks.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c0863f61e97e60f3f5a6d55652e6813f07c81bd3 |
| --- /dev/null |
| +++ b/Source/modules/audio_output_devices/SetSinkIdCallbacks.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
Mike West
2015/06/17 11:44:37
Nit: 2015.
Guido Urdaneta
2015/06/17 12:25:16
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SetSinkIdCallbacks_h |
| +#define SetSinkIdCallbacks_h |
| + |
| +#include "platform/Timer.h" |
| +#include "platform/heap/Handle.h" |
| +#include "public/platform/WebCallbacks.h" |
| +#include "wtf/Noncopyable.h" |
| +#include "wtf/PassRefPtr.h" |
| +#include "wtf/RefPtr.h" |
| + |
| +namespace blink { |
| + |
| +class HTMLMediaElement; |
| +class ScriptPromiseResolver; |
| +struct WebSetSinkIdError; |
| + |
| +class SetSinkIdCallbacks final : public WebCallbacks<void, WebSetSinkIdError> { |
| + WTF_MAKE_NONCOPYABLE(SetSinkIdCallbacks); |
| +public: |
| + SetSinkIdCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver>, HTMLMediaElement&, const String&); |
| + ~SetSinkIdCallbacks() override; |
| + |
| + void onSuccess() override; |
| + void onError(WebSetSinkIdError*) override; |
| + |
| +private: |
| + RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; |
| + RefPtrWillBePersistent<HTMLMediaElement> m_element; |
| + String m_sinkId; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // SetSinkIdCallbacks_h |