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