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

Unified Diff: ui/file_manager/video_player/js/video_player.js

Issue 1457993002: VideoPlayer: VideoPlayer: Fix calculation of window size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/closure_compiler/externs/chrome_extensions.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index 94c3367173d820d205126bd6ecae6034494216de..544abfb3fc414b1d94056215ebeb9a175b6182a2 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -495,9 +495,10 @@ VideoPlayer.prototype.onFirstVideoReady_ = function() {
}
var appWindow = chrome.app.window.current();
- appWindow.resizeTo(newWidth, newHeight);
- appWindow.moveTo(oldLeft - (newWidth - oldWidth) / 2,
- oldTop - (newHeight - oldHeight) / 2);
+ appWindow.innerBounds.width = Math.round(newWidth);
+ appWindow.innerBounds.height = Math.round(newHeight);
+ appWindow.outerBounds.left = Math.round(oldLeft - (newWidth - oldWidth) / 2);
+ appWindow.outerBounds.top = Math.round(oldTop - (newHeight - oldHeight) / 2);
appWindow.show();
this.videoElement_.play();
« no previous file with comments | « third_party/closure_compiler/externs/chrome_extensions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698