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

Unified Diff: third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.h

Issue 1416123005: Implement setSinkId() for media elements without src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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: third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.h
diff --git a/third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.h b/third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.h
new file mode 100644
index 0000000000000000000000000000000000000000..1aee70d14bb7f0f93432ad5189b412d5b35918e3
--- /dev/null
+++ b/third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.h
@@ -0,0 +1,36 @@
+// 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 AudioOutputDeviceClient_h
+#define AudioOutputDeviceClient_h
+
+#include "modules/ModulesExport.h"
+#include "platform/Supplementable.h"
+#include "public/platform/WebSetSinkIdCallbacks.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace blink {
+
+class ExecutionContext;
+class LocalFrame;
+class WebString;
+class ScriptState;
+
+class AudioOutputDeviceClient : public WillBeHeapSupplement<LocalFrame> {
+public:
+ virtual ~AudioOutputDeviceClient() {}
+
+ // Checks that a given sink exists and has permissions to be used from the origin of the current frame.
+ virtual void checkIfAudioSinkExistsAndIsAuthorized(ExecutionContext*, const WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks>) = 0;
+
+ // WillBeHeapSupplement requirements.
+ static AudioOutputDeviceClient* from(ExecutionContext*);
+ static const char* supplementName();
+};
+
+MODULES_EXPORT void provideAudioOutputDeviceClientTo(LocalFrame&, PassOwnPtrWillBeRawPtr<AudioOutputDeviceClient>);
+
+} // namespace blink
+
+#endif // AudioOutputDeviceClient_h

Powered by Google App Engine
This is Rietveld 408576698