summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 23:13:26 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 23:13:26 +0000
commit1c55814d24b7fd47eea38de4a5bc651dec0b9c66 (patch)
treef53a418907dd66dfd3e8a8f7f994d9578b3f97e6 /remoting
parent98977bcb47f6a01c3837e16316b6ae657d220259 (diff)
downloadchromium_src-1c55814d24b7fd47eea38de4a5bc651dec0b9c66.zip
chromium_src-1c55814d24b7fd47eea38de4a5bc651dec0b9c66.tar.gz
chromium_src-1c55814d24b7fd47eea38de4a5bc651dec0b9c66.tar.bz2
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
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/me2mom/client_screen.js3
-rw-r--r--remoting/webapp/me2mom/client_session.js2
-rw-r--r--remoting/webapp/me2mom/toolbar.js20
3 files changed, 13 insertions, 12 deletions
diff --git a/remoting/webapp/me2mom/client_screen.js b/remoting/webapp/me2mom/client_screen.js
index 1574e47..58838a3 100644
--- a/remoting/webapp/me2mom/client_screen.js
+++ b/remoting/webapp/me2mom/client_screen.js
@@ -122,8 +122,7 @@ remoting.toggleScaleToFit = function(button) {
*/
remoting.onResize = function() {
if (remoting.clientSession)
- remoting.clientSession.onWindowSizeChanged();
- remoting.toolbar.center();
+ remoting.clientSession.onResize();
}
/**
diff --git a/remoting/webapp/me2mom/client_session.js b/remoting/webapp/me2mom/client_session.js
index 464aa50..71adfda 100644
--- a/remoting/webapp/me2mom/client_session.js
+++ b/remoting/webapp/me2mom/client_session.js
@@ -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();
};
diff --git a/remoting/webapp/me2mom/toolbar.js b/remoting/webapp/me2mom/toolbar.js
index b4b5644..85ad48b 100644
--- a/remoting/webapp/me2mom/toolbar.js
+++ b/remoting/webapp/me2mom/toolbar.js
@@ -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);
};
/**