OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * Display error message. | 6 * Display error message. |
7 * @param {string} message Message id. | 7 * @param {string} message Message id. |
8 */ | 8 */ |
9 function showErrorMessage(message) { | 9 function showErrorMessage(message) { |
10 var errorBanner = document.querySelector('#error'); | 10 var errorBanner = document.querySelector('#error'); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 this.updateStyle(); | 57 this.updateStyle(); |
58 window.addEventListener('resize', this.updateStyle.bind(this)); | 58 window.addEventListener('resize', this.updateStyle.bind(this)); |
59 | 59 |
60 document.addEventListener('keydown', function(e) { | 60 document.addEventListener('keydown', function(e) { |
61 if (e.keyIdentifier == 'U+0020') { | 61 if (e.keyIdentifier == 'U+0020') { |
62 this.togglePlayStateWithFeedback(); | 62 this.togglePlayStateWithFeedback(); |
63 e.preventDefault(); | 63 e.preventDefault(); |
64 } | 64 } |
65 }.bind(this)); | 65 }.bind(this)); |
66 | 66 |
| 67 util.disableBrowserShortcutKeys(document); |
| 68 |
67 videoContainer.addEventListener('click', | 69 videoContainer.addEventListener('click', |
68 this.togglePlayStateWithFeedback.bind(this)); | 70 this.togglePlayStateWithFeedback.bind(this)); |
69 | 71 |
70 this.inactivityWatcher_ = new MouseInactivityWatcher(playerContainer); | 72 this.inactivityWatcher_ = new MouseInactivityWatcher(playerContainer); |
71 this.__defineGetter__('inactivityWatcher', function() { | 73 this.__defineGetter__('inactivityWatcher', function() { |
72 return this.inactivityWatcher_; | 74 return this.inactivityWatcher_; |
73 }); | 75 }); |
74 | 76 |
75 this.inactivityWatcher_.check(); | 77 this.inactivityWatcher_.check(); |
76 } | 78 } |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 webkitResolveLocalFileSystemURL(src, | 255 webkitResolveLocalFileSystemURL(src, |
254 function(entry) { | 256 function(entry) { |
255 var video = document.querySelector('video'); | 257 var video = document.querySelector('video'); |
256 if (video.src != src) return; | 258 if (video.src != src) return; |
257 selectedItemFilesystemPath = entry.fullPath; | 259 selectedItemFilesystemPath = entry.fullPath; |
258 }); | 260 }); |
259 }); | 261 }); |
260 } | 262 } |
261 | 263 |
262 util.addPageLoadHandler(loadVideoPlayer); | 264 util.addPageLoadHandler(loadVideoPlayer); |
OLD | NEW |