Commit 1c55814d authored by jamiewalch@google.com's avatar jamiewalch@google.com

Fix null pointer error.

BUG=106860
TEST=Manual

Review URL: http://codereview.chromium.org/8897017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113882 0039d316-1c4b-4281-b951-d872f2087c98
parent 98977bcb
......@@ -122,8 +122,7 @@ remoting.toggleScaleToFit = function(button) {
*/
remoting.onResize = function() {
if (remoting.clientSession)
remoting.clientSession.onWindowSizeChanged();
remoting.toolbar.center();
remoting.clientSession.onResize();
}
/**
......
......@@ -354,7 +354,7 @@ remoting.ClientSession.prototype.setState_ = function(newState) {
*
* @return {void} Nothing.
*/
remoting.ClientSession.prototype.onWindowSizeChanged = function() {
remoting.ClientSession.prototype.onResize = function() {
this.updateDimensions();
};
......
......@@ -22,6 +22,16 @@ remoting.Toolbar = function(toolbar) {
* @private
*/
this.toolbar_ = toolbar;
/**
* @type {boolean} False if the tool-bar is currently hidden, or should be
* hidden once the over-shoot timer expires; true otherwise.
*/
this.visible = false;
/**
* @type {number?} The id of the current timer, if any.
*/
this.timerId = null;
/** @type {remoting.Toolbar} */
var that = this;
......@@ -44,15 +54,7 @@ remoting.Toolbar = function(toolbar) {
that.showForAtLeast_(1000);
};
/**
* @type {boolean} False if the tool-bar is currently hidden, or should be
* hidden once the over-shoot timer expires; true otherwise.
*/
this.visible = false;
/**
* @type {number?} The id of the current timer, if any.
*/
this.timerId = null;
window.addEventListener('resize', function() { that.center(); }, false);
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment