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

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

Issue 888323002: Improve HRD first run experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for Checkin Created 5 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 | « remoting/webapp/base/js/ipc.js ('k') | remoting/webapp/crd/html/dialog_hangout_consent.css » ('j') | no next file with comments »
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 d80c2053f9407ce7987946e8e595faaa6dc4febc..cc7b82e7f6fed69b78581076d76f3102fc50b128 100644
--- a/remoting/webapp/base/js/message_window.js
+++ b/remoting/webapp/base/js/message_window.js
@@ -45,20 +45,6 @@ MessageWindowImpl.prototype.sendReply_ = function(
};
/**
- * Size the window to its content vertically.
- * @private
- */
-MessageWindowImpl.prototype.updateSize_ = function() {
- 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);
-};
-
-/**
* Initializes the button with the label and the click handler.
* Hides the button if the label is null or undefined.
*
@@ -145,7 +131,7 @@ MessageWindowImpl.prototype.onMessage_ = function(event) {
chrome.app.window.current().onClosed.addListener(
this.sendReply_.bind(this, event.source, messageId, 0));
- this.updateSize_();
+ base.resizeWindowToContent();
chrome.app.window.current().show();
break;
@@ -159,7 +145,7 @@ MessageWindowImpl.prototype.onMessage_ = function(event) {
var messageDiv = document.getElementById('message');
messageDiv.innerText = message;
- this.updateSize_();
+ base.resizeWindowToContent();
break;
default:
« no previous file with comments | « remoting/webapp/base/js/ipc.js ('k') | remoting/webapp/crd/html/dialog_hangout_consent.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698