Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1491)

Unified Diff: Source/modules/audio_output_devices/SetSinkIdCallbacks.h

Issue 1188203002: Implementation of setSinkId() for HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add guidou as owner Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..023023b2d19e79b2f31ecaf85709a662ddd8d080
--- /dev/null
+++ b/Source/modules/audio_output_devices/SetSinkIdCallbacks.h
@@ -0,0 +1,38 @@
+// Copyright 2015 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 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& sinkId);
+ ~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

Powered by Google App Engine
This is Rietveld 408576698