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

Unified Diff: extensions/test/data/app_view/apitest/media_request/main.js

Issue 820583002: Adds support for media permission request handling on <appview> tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn build Created 6 years 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: extensions/test/data/app_view/apitest/media_request/main.js
diff --git a/extensions/test/data/app_view/apitest/media_request/main.js b/extensions/test/data/app_view/apitest/media_request/main.js
new file mode 100644
index 0000000000000000000000000000000000000000..ca65e5ca5b85edb89e062ec3dbe27f9262e7534f
--- /dev/null
+++ b/extensions/test/data/app_view/apitest/media_request/main.js
@@ -0,0 +1,15 @@
+// Copyright 2014 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.
+
+window.onload = function() {
+ var webview = document.createElement("webview");
+ webview.partition = "media";
+ webview.addEventListener("permissionrequest", function(e) {
+ if (e.permission == "media") {
+ e.request.allow();
+ }
+ });
+ document.body.appendChild(webview);
+ webview.src = "guest.html";
+}

Powered by Google App Engine
This is Rietveld 408576698