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..9b2e39e7e3279266542fd93758f91e1b5f18d90d |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClient.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 AudioOutputDeviceClient_h |
+#define AudioOutputDeviceClient_h |
+ |
+#include "bindings/core/v8/ScriptPromise.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> { |
jochen (gone - plz use gerrit)
2015/10/28 14:18:49
why do you need this interface? all usages of the
Guido Urdaneta
2015/10/28 15:58:44
I see the following choices:
a) Implement in web/
jochen (gone - plz use gerrit)
2015/10/28 16:06:47
that looks a bit like hiding a layering violation
haraken
2015/10/28 16:15:40
This is a common pattern to bypass a disallowed de
|
+public: |
+ virtual ~AudioOutputDeviceClient() {} |
+ |
+ // Checks that a given sink exists and has permissions to be used from the |
+ // origin of the current frame. |
+ virtual void checkAudioSink(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 |