| OLD | NEW |
| 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 * Base class for managing hotwording sessions. | 9 * Base class for managing hotwording sessions. |
| 10 * @param {!hotword.StateManager} stateManager Manager of global hotwording | 10 * @param {!hotword.StateManager} stateManager Manager of global hotwording |
| 11 * state. | 11 * state. |
| 12 * @param {!hotword.constants.SessionSource} sessionSource Source of the | 12 * @param {!hotword.constants.SessionSource} sessionSource Source of the |
| 13 * hotword session request. | 13 * hotword session request. |
| 14 * @constructor | 14 * @constructor |
| 15 * @struct | 15 * @class |
| 16 */ | 16 */ |
| 17 function BaseSessionManager(stateManager, sessionSource) { | 17 function BaseSessionManager(stateManager, sessionSource) { |
| 18 /** | 18 /** |
| 19 * Manager of global hotwording state. | 19 * Manager of global hotwording state. |
| 20 * @protected {!hotword.StateManager} | 20 * @protected {!hotword.StateManager} |
| 21 */ | 21 */ |
| 22 this.stateManager = stateManager; | 22 this.stateManager = stateManager; |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Source of the hotword session request. | 25 * Source of the hotword session request. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 this.removeListeners_(); | 147 this.removeListeners_(); |
| 148 this.stopSession_(); | 148 this.stopSession_(); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 return { | 153 return { |
| 154 BaseSessionManager: BaseSessionManager | 154 BaseSessionManager: BaseSessionManager |
| 155 }; | 155 }; |
| 156 }); | 156 }); |
| OLD | NEW |