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

Unified Diff: remoting/webapp/base/js/message_window.js

Issue 654393005: [Chromoting] Update size to use inner/outer bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | remoting/webapp/js_proto/chrome_proto.js » ('j') | remoting/webapp/js_proto/chrome_proto.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/message_window.js
diff --git a/remoting/webapp/base/js/message_window.js b/remoting/webapp/base/js/message_window.js
index a57684a662b3ea3460a9a0d67c73d5cf03843d27..297373aa658946efb2fbb46ce53335641d2a8491 100644
--- a/remoting/webapp/base/js/message_window.js
+++ b/remoting/webapp/base/js/message_window.js
@@ -49,8 +49,13 @@ MessageWindowImpl.prototype.sendReply_ = function(
* @private
*/
MessageWindowImpl.prototype.updateSize_ = function() {
- var borderY = window.outerHeight - window.innerHeight;
- window.resizeTo(window.outerWidth, document.body.clientHeight + borderY);
+ var outerBounds = chrome.app.window.current().outerBounds;
+ var innerBounds = chrome.app.window.current().innerBounds;
+ var borderY = outerBounds.height - innerBounds.height;
+ window.resizeTo(outerBounds.width, document.body.clientHeight + borderY);
+ // Sometimes, resizing the window causes its position to be reset to (0, 0),
+ // so restore it explicitly.
+ window.moveTo(outerBounds.left, outerBounds.top);
};
/**
« no previous file with comments | « no previous file | remoting/webapp/js_proto/chrome_proto.js » ('j') | remoting/webapp/js_proto/chrome_proto.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698