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

Unified Diff: third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp

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/web/AudioOutputDeviceClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp b/third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..db13a7f41e3f9d01ceeff9ebdb8f662ec1b7c40d
--- /dev/null
+++ b/third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp
@@ -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.
+
+#include "config.h"
+#include "web/AudioOutputDeviceClientImpl.h"
+
+#include "core/dom/Document.h"
+#include "core/dom/ExecutionContext.h"
+#include "public/web/WebFrameClient.h"
+#include "web/WebLocalFrameImpl.h"
+
+namespace blink {
+
+PassOwnPtrWillBeRawPtr<AudioOutputDeviceClientImpl> AudioOutputDeviceClientImpl::create()
+{
+ return adoptPtrWillBeNoop(new AudioOutputDeviceClientImpl());
+}
+
+AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl()
+{
+}
+
+AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl()
+{
+}
+
+void AudioOutputDeviceClientImpl::checkIfAudioSinkExistsAndIsAuthorized(ExecutionContext* context, const WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks> callbacks)
+{
+ ASSERT(context && context->isDocument());
+ Document* document = toDocument(context);
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
+ webFrame->client()->checkIfAudioSinkExistsAndIsAuthorized(sinkId, WebSecurityOrigin(context->securityOrigin()), callbacks.leakPtr());
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698