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

Side by Side Diff: android_webview/test/shell/assets/full_screen_video.js

Issue 639413002: [aw] Reuse WebContents PowerSaveBlocker in fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testsForPowerSaver
Patch Set: Nits Created 6 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function goFullscreen(id) { 5 function goFullscreen(id) {
6 var element = document.getElementById(id); 6 var element = document.getElementById(id);
7 if (element.webkitRequestFullScreen) { 7 if (element.webkitRequestFullScreen) {
8 element.webkitRequestFullScreen(); 8 element.webkitRequestFullScreen();
9 } 9 }
10 } 10 }
11 11
12 function playVideo() { 12 function playVideo() {
13 document.getElementById('video').play(); 13 document.getElementById('video').play();
14 } 14 }
15 15
16 addEventListener('DOMContentLoaded', function() { 16 addEventListener('DOMContentLoaded', function() {
17 document.addEventListener('webkitfullscreenchange', function() {
18 javaOnEnterFullscreen.notifyJava();
19 }, false);
20 document.getElementById('video').addEventListener('play', function() {
21 javaOnPlayObserver.notifyJava();
22 }, false);
23 document.addEventListener('webkitfullscreenerror', function() { 17 document.addEventListener('webkitfullscreenerror', function() {
24 javaFullScreenErrorObserver.notifyJava(); 18 javaFullScreenErrorObserver.notifyJava();
25 }, false); 19 }, false);
26 }, false); 20 }, false);
27 21
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | android_webview/test/shell/assets/full_screen_video_inside_div_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698