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

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

Issue 600523004: Support hotwording on google.com and the new tab page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move started callback into session object. 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @fileoverview This is the audio client content script injected into eligible 8 * @fileoverview This is the audio client content script injected into eligible
9 * Google.com and New tab pages for interaction between the Webpage and the 9 * Google.com and New tab pages for interaction between the Webpage and the
10 * Hotword extension. 10 * Hotword extension.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 NO_HOTWORD_STARTED_UI: 'ac2', 83 NO_HOTWORD_STARTED_UI: 'ac2',
84 NO_HOTWORD_TIMEOUT_UI: 'ac3', 84 NO_HOTWORD_TIMEOUT_UI: 'ac3',
85 NO_HOTWORD_ERROR_UI: 'ac4' 85 NO_HOTWORD_ERROR_UI: 'ac4'
86 }; 86 };
87 87
88 88
89 /** 89 /**
90 * @const {string} 90 * @const {string}
91 * @private 91 * @private
92 */ 92 */
93 AudioClient.HOTWORD_EXTENSION_ID_ = 'bepbmhgboaologfdajaanbcjmnhjmhfn'; 93 AudioClient.HOTWORD_EXTENSION_ID_ = 'nbpagnldghgfoolbancepceaanlmhfmd';
Dan Beam 2014/10/09 22:43:58 nit: eventually makes sense to only have 1 line be
Anand Mistry (off Chromium) 2014/10/10 23:22:15 Done.
94 94
95 95
96 /** 96 /**
97 * Number of times to retry checking a transient error. 97 * Number of times to retry checking a transient error.
98 * @const {number} 98 * @const {number}
99 * @private 99 * @private
100 */ 100 */
101 AudioClient.MAX_RETRIES = 3; 101 AudioClient.MAX_RETRIES = 3;
102 102
103 103
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 this.handleCommandFromExtension_.bind(this)); 378 this.handleCommandFromExtension_.bind(this));
379 379
380 if (this.speechActive_) 380 if (this.speechActive_)
381 this.sendCommandToExtension_(AudioClient.CommandFromPage.SPEECH_START); 381 this.sendCommandToExtension_(AudioClient.CommandFromPage.SPEECH_START);
382 }; 382 };
383 383
384 384
385 // Initializes as soon as the code is ready, do not wait for the page. 385 // Initializes as soon as the code is ready, do not wait for the page.
386 new AudioClient().initialize(); 386 new AudioClient().initialize();
387 })(); 387 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698