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

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

Issue 1023063004: Hotword: Check for the existence of a speaker model. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct error handling Created 5 years, 9 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/training_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 (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
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 }());
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/hotword/training_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698