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

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/media_controls.js

Issue 9298009: Implementing full screen mode for video player in Chrome OS File Browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright fix Created 8 years, 11 months 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
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/media_controls.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/media_controls.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/media_controls.js b/chrome/browser/resources/file_manager/js/image_editor/media_controls.js
index 61406659ba2393705d262421ea74fd20e3a0ba9e..e3bc0f260a15ac045a0398527b2e880a35b61262 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/media_controls.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/media_controls.js
@@ -10,14 +10,15 @@
/**
* @param {HTMLMediaElement} mediaElement The media element to control.
* @param {HTMLElement} containerElement The container for the controls.
+ * @param {function} fullScreenToggle Function to toggle the fullscreen mode.
* @constructor
*/
-function MediaControls(mediaElement, containerElement) {
+function MediaControls(mediaElement, containerElement, fullScreenToggle) {
this.media_ = mediaElement;
this.container_ = containerElement;
this.document_ = this.container_.ownerDocument;
- this.setupPlaybackControls_();
+ this.setupPlaybackControls_(fullScreenToggle);
this.setupMediaEvents_();
}
@@ -97,8 +98,10 @@ MediaControls.PROGRESS_RANGE = 1000;
/**
* Create playback controls in DOM.
+ *
+ * @param {function} fullScreenToggle Function to toggle the fullscreen mode.
*/
-MediaControls.prototype.setupPlaybackControls_ = function() {
+MediaControls.prototype.setupPlaybackControls_ = function(fullScreenToggle) {
this.playButton_ = this.createButton_(
'play', this.onPlayButtonClick_.bind(this));
@@ -146,8 +149,9 @@ MediaControls.prototype.setupPlaybackControls_ = function() {
this.volume_.setValue(this.media_.volume);
- this.fullscreenButton_ = this.createButton_(
- 'fullscreen', this.onFullscreenButtonClick_.bind(this));
+ if (fullScreenToggle) {
+ this.fullscreenButton_ = this.createButton_('fullscreen', fullScreenToggle);
+ }
};
MediaControls.prototype.displayProgress_ = function(current, duration) {
@@ -278,11 +282,6 @@ MediaControls.prototype.onVolumeMouseDown_ = function () {
}
};
-MediaControls.prototype.onFullscreenButtonClick_ = function() {
- this.fullscreenButton_.classList.toggle('on');
- // TODO: invoke the actual full screen mode
-};
-
/**
* Attach media event handlers.
*/
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/media_controls.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698