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

Side by Side Diff: remoting/webapp/base/js/base.js

Issue 896003002: Use the local user's email when connecting to It2MeHelpeeChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@HRD_V2Auth
Patch Set: Fix unit test failure and rebase Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/background.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * A module that contains basic utility components and methods for the 7 * A module that contains basic utility components and methods for the
8 * chromoting project 8 * chromoting project
9 * 9 *
10 */ 10 */
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 * @type {Array.<base.Disposable>} 71 * @type {Array.<base.Disposable>}
72 * @private 72 * @private
73 */ 73 */
74 this.disposables_ = Array.prototype.slice.call(arguments, 0); 74 this.disposables_ = Array.prototype.slice.call(arguments, 0);
75 }; 75 };
76 76
77 base.Disposables.prototype.dispose = function() { 77 base.Disposables.prototype.dispose = function() {
78 for (var i = 0; i < this.disposables_.length; i++) { 78 for (var i = 0; i < this.disposables_.length; i++) {
79 this.disposables_[i].dispose(); 79 this.disposables_[i].dispose();
80 } 80 }
81 this.disposables_ = null;
81 }; 82 };
82 83
83 /** 84 /**
84 * A utility function to invoke |obj|.dispose without a null check on |obj|. 85 * A utility function to invoke |obj|.dispose without a null check on |obj|.
85 * @param {base.Disposable} obj 86 * @param {base.Disposable} obj
86 */ 87 */
87 base.dispose = function(obj) { 88 base.dispose = function(obj) {
88 if (obj) { 89 if (obj) {
89 base.debug.assert(typeof obj.dispose == 'function'); 90 base.debug.assert(typeof obj.dispose == 'function');
90 obj.dispose(); 91 obj.dispose();
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 */ 603 */
603 base.resizeWindowToContent = function() { 604 base.resizeWindowToContent = function() {
604 var appWindow = chrome.app.window.current(); 605 var appWindow = chrome.app.window.current();
605 var outerBounds = appWindow.outerBounds; 606 var outerBounds = appWindow.outerBounds;
606 var borderY = outerBounds.height - appWindow.innerBounds.height; 607 var borderY = outerBounds.height - appWindow.innerBounds.height;
607 appWindow.resizeTo(outerBounds.width, document.body.clientHeight + borderY); 608 appWindow.resizeTo(outerBounds.width, document.body.clientHeight + borderY);
608 // Sometimes, resizing the window causes its position to be reset to (0, 0), 609 // Sometimes, resizing the window causes its position to be reset to (0, 0),
609 // so restore it explicitly. 610 // so restore it explicitly.
610 appWindow.moveTo(outerBounds.left, outerBounds.top); 611 appWindow.moveTo(outerBounds.left, outerBounds.top);
611 }; 612 };
OLDNEW
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698