| 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 (function() { | 5 (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @fileoverview This extension provides hotword triggering capabilites to | 9 * @fileoverview This extension provides hotword triggering capabilites to |
| 10 * Chrome. | 10 * Chrome. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Detect when hotword settings have changed. | 32 // Detect when hotword settings have changed. |
| 33 chrome.hotwordPrivate.onEnabledChanged.addListener(function() { | 33 chrome.hotwordPrivate.onEnabledChanged.addListener(function() { |
| 34 stateManager.updateStatus(); | 34 stateManager.updateStatus(); |
| 35 }); | 35 }); |
| 36 | 36 |
| 37 // Detect a request to delete the speaker model. | 37 // Detect a request to delete the speaker model. |
| 38 chrome.hotwordPrivate.onDeleteSpeakerModel.addListener(function() { | 38 chrome.hotwordPrivate.onDeleteSpeakerModel.addListener(function() { |
| 39 hotword.TrainingManager.handleDeleteSpeakerModel(); | 39 hotword.TrainingManager.handleDeleteSpeakerModel(); |
| 40 }); | 40 }); |
| 41 | 41 |
| 42 // Detect a request for the speaker model existence. |
| 43 chrome.hotwordPrivate.onSpeakerModelExists.addListener(function() { |
| 44 hotword.TrainingManager.handleSpeakerModelExists(); |
| 45 }); |
| 46 |
| 42 // Detect when the shared module containing the NaCL module and language model | 47 // Detect when the shared module containing the NaCL module and language model |
| 43 // is installed. | 48 // is installed. |
| 44 chrome.management.onInstalled.addListener(function(info) { | 49 chrome.management.onInstalled.addListener(function(info) { |
| 45 if (info.id == hotword.constants.SHARED_MODULE_ID) { | 50 if (info.id == hotword.constants.SHARED_MODULE_ID) { |
| 46 hotword.debug('Shared module installed, reloading extension.'); | 51 hotword.debug('Shared module installed, reloading extension.'); |
| 47 chrome.runtime.reload(); | 52 chrome.runtime.reload(); |
| 48 } | 53 } |
| 49 }); | 54 }); |
| 50 }()); | 55 }()); |
| OLD | NEW |