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

Side by Side Diff: chrome/browser/resources/hotword/always_on_manager.js

Issue 658393003: Fix some straight-forward closure compiler errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | chrome/browser/resources/hotword/base_session_manager.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 cr.define('hotword', function() { 5 cr.define('hotword', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Class used to manage always-on hotwording. Automatically starts hotwording 9 * Class used to manage always-on hotwording. Automatically starts hotwording
10 * on startup, if always-on is enabled, and starts/stops hotwording at 10 * on startup, if always-on is enabled, and starts/stops hotwording at
11 * appropriate times. 11 * appropriate times.
12 * @param {!hotword.StateManager} stateManager 12 * @param {!hotword.StateManager} stateManager
13 * @constructor 13 * @constructor
14 * @extends {hotword.BaseSessionManager} 14 * @extends {hotword.BaseSessionManager}
15 * @struct 15 * @class
Dan Beam 2014/10/21 03:07:39 why both @class and @constructor?
Anand Mistry (off Chromium) 2014/10/21 03:42:21 Dunno. I was following some other code which did t
16 */ 16 */
17 function AlwaysOnManager(stateManager) { 17 function AlwaysOnManager(stateManager) {
18 hotword.BaseSessionManager.call(this, 18 hotword.BaseSessionManager.call(this,
19 stateManager, 19 stateManager,
20 hotword.constants.SessionSource.ALWAYS); 20 hotword.constants.SessionSource.ALWAYS);
21 } 21 }
22 22
23 AlwaysOnManager.prototype = { 23 AlwaysOnManager.prototype = {
24 __proto__: hotword.BaseSessionManager.prototype, 24 __proto__: hotword.BaseSessionManager.prototype,
25 25
26 /** override */ 26 /** @override */
27 enabled: function() { 27 enabled: function() {
28 return this.stateManager.isAlwaysOnEnabled(); 28 return this.stateManager.isAlwaysOnEnabled();
29 }, 29 },
30 30
31 /** override */ 31 /** @override */
32 updateListeners: function() { 32 updateListeners: function() {
33 hotword.BaseSessionManager.prototype.updateListeners.call(this); 33 hotword.BaseSessionManager.prototype.updateListeners.call(this);
34 if (this.enabled()) 34 if (this.enabled())
35 this.startSession_(); 35 this.startSession_();
36 } 36 }
37 }; 37 };
38 38
39 return { 39 return {
40 AlwaysOnManager: AlwaysOnManager 40 AlwaysOnManager: AlwaysOnManager
41 }; 41 };
42 }); 42 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/hotword/base_session_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698