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

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

Issue 1182243005: Add sinkId/setSinkId() extension to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected value for public interface/properties tests 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/HTMLMediaElementAudioOutputDevice.h
diff --git a/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h b/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h
new file mode 100644
index 0000000000000000000000000000000000000000..f75cedd438c24f3b923734d57dcc7e17f68e5abd
--- /dev/null
+++ b/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h
@@ -0,0 +1,37 @@
+// 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 HTMLMediaElementAudioOutputDevice_h
+#define HTMLMediaElementAudioOutputDevice_h
+
+#include "bindings/core/v8/ScriptPromise.h"
+#include "core/dom/ContextLifecycleObserver.h"
+#include "core/dom/ExceptionCode.h"
+#include "core/html/HTMLMediaElement.h"
+#include "platform/Supplementable.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class HTMLMediaElement;
+class ScriptState;
+
+class HTMLMediaElementAudioOutputDevice final : public NoBaseWillBeGarbageCollectedFinalized<HTMLMediaElementAudioOutputDevice>, public WillBeHeapSupplement<HTMLMediaElement> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElementAudioOutputDevice);
+public:
+ DECLARE_VIRTUAL_TRACE();
+ static String sinkId(HTMLMediaElement&);
+ static ScriptPromise setSinkId(ScriptState*, HTMLMediaElement&, const String& newSinkId);
+
+private:
+ HTMLMediaElementAudioOutputDevice();
+ static HTMLMediaElementAudioOutputDevice& from(HTMLMediaElement&);
+ static const char* supplementName();
+
+ String m_sinkId;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698