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

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

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * The deserialized form of the chromoting host as returned by Apiary. 7 * The deserialized form of the chromoting host as returned by Apiary.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // remoting.HostSettings. 70 // remoting.HostSettings.
71 remoting.HostSettings.save(this.hostId_, this); 71 remoting.HostSettings.save(this.hostId_, this);
72 }; 72 };
73 73
74 74
75 /** @return {Promise} A promise that resolves when the settings are loaded. */ 75 /** @return {Promise} A promise that resolves when the settings are loaded. */
76 remoting.Host.Options.prototype.load = function() { 76 remoting.Host.Options.prototype.load = function() {
77 var that = this; 77 var that = this;
78 return base.Promise.as(remoting.HostSettings.load, [this.hostId_]).then( 78 return base.Promise.as(remoting.HostSettings.load, [this.hostId_]).then(
79 /** 79 /**
80 * @param {Object.<string|boolean|number>} options 80 * @param {Object<string|boolean|number>} options
81 */ 81 */
82 function(options) { 82 function(options) {
83 // Must be defaulted to true so that app-remoting can resize the host 83 // Must be defaulted to true so that app-remoting can resize the host
84 // upon launching. 84 // upon launching.
85 // TODO(kelvinp): Uses a separate host options for app-remoting that 85 // TODO(kelvinp): Uses a separate host options for app-remoting that
86 // hardcodes resizeToClient to true. 86 // hardcodes resizeToClient to true.
87 that.resizeToClient = 87 that.resizeToClient =
88 base.getBooleanAttr(options, 'resizeToClient', true); 88 base.getBooleanAttr(options, 'resizeToClient', true);
89 that.shrinkToFit = base.getBooleanAttr(options, 'shrinkToFit', true); 89 that.shrinkToFit = base.getBooleanAttr(options, 'shrinkToFit', true);
90 that.desktopScale = base.getNumberAttr(options, 'desktopScale', 1); 90 that.desktopScale = base.getNumberAttr(options, 'desktopScale', 1);
(...skipping 23 matching lines...) Expand all
114 var hostMajorVersion = parseInt(host.hostVersion, 10); 114 var hostMajorVersion = parseInt(host.hostVersion, 10);
115 if (isNaN(hostMajorVersion)) { 115 if (isNaN(hostMajorVersion)) {
116 // Host versions 26 and higher include the version number in heartbeats, 116 // Host versions 26 and higher include the version number in heartbeats,
117 // so if it's missing then the host is at most version 25. 117 // so if it's missing then the host is at most version 25.
118 hostMajorVersion = 25; 118 hostMajorVersion = 25;
119 } 119 }
120 return (parseInt(webappVersion, 10) - hostMajorVersion) > 1; 120 return (parseInt(webappVersion, 10) - hostMajorVersion) > 1;
121 }; 121 };
122 122
123 })(); 123 })();
OLDNEW
« no previous file with comments | « remoting/webapp/base/js/client_plugin_host_desktop_impl.js ('k') | tools/deep_memory_profiler/visualizer/static/graph-view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698