OLD | NEW |
---|---|
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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** @constructor */ | 10 /** @constructor */ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 if (typeof(result) == 'undefined') { | 59 if (typeof(result) == 'undefined') { |
60 // If the plug-in can't be instantiated, for example on ChromeOS, then | 60 // If the plug-in can't be instantiated, for example on ChromeOS, then |
61 // return something sensible. | 61 // return something sensible. |
62 return remoting.HostController.State.NOT_IMPLEMENTED; | 62 return remoting.HostController.State.NOT_IMPLEMENTED; |
63 } else { | 63 } else { |
64 return result; | 64 return result; |
65 } | 65 } |
66 }; | 66 }; |
67 | 67 |
68 /** | 68 /** |
69 * @param {function(boolean, boolean):void} callback | |
70 * Callback to be called when done. | |
Jamie
2012/06/14 23:43:56
Nit: Indent the description four spaces, and start
alexeypa (please no reviews)
2012/06/19 23:27:29
Done.
| |
71 */ | |
72 remoting.HostController.prototype.getConsent = function(callback) { | |
73 this.plugin_.getUsageStatsConsent(callback); | |
74 }; | |
75 | |
76 /** | |
77 * Records the user's consent to crash dump reporting. | |
78 * @param {boolean} Whether the user allows crash dump reporting. | |
Jamie
2012/06/14 23:43:56
You're missing an |allowed| in this JSDoc comment.
alexeypa (please no reviews)
2012/06/19 23:27:29
Done.
| |
79 */ | |
80 remoting.HostController.prototype.setConsent = function(allowed) { | |
81 this.plugin_.setUsageStatsConsent(allowed); | |
82 }; | |
83 | |
84 /** | |
69 * Show or hide daemon-specific parts of the UI. | 85 * Show or hide daemon-specific parts of the UI. |
70 * @return {void} Nothing. | 86 * @return {void} Nothing. |
71 */ | 87 */ |
72 remoting.HostController.prototype.updateDom = function() { | 88 remoting.HostController.prototype.updateDom = function() { |
73 var match = ''; | 89 var match = ''; |
74 var state = this.state(); | 90 var state = this.state(); |
75 switch (state) { | 91 switch (state) { |
76 case remoting.HostController.State.STARTED: | 92 case remoting.HostController.State.STARTED: |
77 remoting.updateModalUi('enabled', 'data-daemon-state'); | 93 remoting.updateModalUi('enabled', 'data-daemon-state'); |
78 break; | 94 break; |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 try { | 379 try { |
364 this.plugin_.getDaemonConfig(onConfig); | 380 this.plugin_.getDaemonConfig(onConfig); |
365 } catch (err) { | 381 } catch (err) { |
366 this.setHost(null); | 382 this.setHost(null); |
367 onDone(); | 383 onDone(); |
368 } | 384 } |
369 }; | 385 }; |
370 | 386 |
371 /** @type {remoting.HostController} */ | 387 /** @type {remoting.HostController} */ |
372 remoting.hostController = null; | 388 remoting.hostController = null; |
OLD | NEW |