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

Side by Side Diff: content/test/data/android/media_permissions.html

Issue 2462963002: Implement modal permission prompts for media permissions on Android. (Closed)
Patch Set: Nits Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/permissions/permission_dialog_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Media</title> 4 <title>Media</title>
5 <script> 5 <script>
6 var micCount = 0; 6 var micCount = 0;
7 var cameraCount = 0; 7 var cameraCount = 0;
8 var combinedCount = 0; 8 var combinedCount = 0;
9 function gotMicrophone(stream) { 9 function gotMicrophone(stream) {
10 micCount++; 10 micCount++;
(...skipping 16 matching lines...) Expand all
27 {audio : true}, gotMicrophone, errorCallback); 27 {audio : true}, gotMicrophone, errorCallback);
28 } 28 }
29 function initiate_getCamera() { 29 function initiate_getCamera() {
30 navigator.webkitGetUserMedia( 30 navigator.webkitGetUserMedia(
31 {video : true}, gotCamera, errorCallback); 31 {video : true}, gotCamera, errorCallback);
32 } 32 }
33 function initiate_getCombined() { 33 function initiate_getCombined() {
34 navigator.webkitGetUserMedia( 34 navigator.webkitGetUserMedia(
35 {video : true, audio: true}, gotCombined, errorCallback); 35 {video : true, audio: true}, gotCombined, errorCallback);
36 } 36 }
37
38 // The modal permission dialog requires a user gesture to trigger. H ook up
39 // a click event listener to run a specified method (which may be ch anged by
40 // the test).
41 var functionToRun = 'initiate_getCombined()';
42 function runFunctionOnClick() {
43 eval(functionToRun);
44 }
45
46 window.addEventListener('load', () => {
47 window.addEventListener('click', runFunctionOnClick);
48 });
37 </script> 49 </script>
38 </head> 50 </head>
39 <body> 51 <body>
40 </body> 52 </body>
41 </html> 53 </html>
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_dialog_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698