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

Unified Diff: chrome/browser/resources/app_list/start_page.js

Issue 29763004: Embeds offline voice recognizer plugin and its manager to app-list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/app_list/start_page.html ('k') | chrome/browser/ui/app_list/start_page_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/app_list/start_page.js
diff --git a/chrome/browser/resources/app_list/start_page.js b/chrome/browser/resources/app_list/start_page.js
index 942b3a9453a6ad64d40211595beed8b2183ec626..a074a27b2ce56bfefdb904d73cb6df1cac82baa3 100644
--- a/chrome/browser/resources/app_list/start_page.js
+++ b/chrome/browser/resources/app_list/start_page.js
@@ -7,10 +7,13 @@
*/
<include src="recommended_apps.js"/>
+<include src="speech_manager.js"/>
cr.define('appList.startPage', function() {
'use strict';
+ var speechManager = null;
+
/**
* Creates a StartPage object.
* @constructor
@@ -51,6 +54,7 @@ cr.define('appList.startPage', function() {
*/
function initialize() {
StartPage.decorate($('start-page'));
+ speechManager = new speech.SpeechManager();
chrome.send('initialize');
}
@@ -62,9 +66,19 @@ cr.define('appList.startPage', function() {
$('start-page').setRecommendedApps(apps);
}
+ function onAppListShown() {
+ speechManager.start();
+ }
+
+ function onAppListHidden() {
+ speechManager.stop();
+ }
+
return {
initialize: initialize,
- setRecommendedApps: setRecommendedApps
+ setRecommendedApps: setRecommendedApps,
+ onAppListShown: onAppListShown,
+ onAppListHidden: onAppListHidden
};
});
« no previous file with comments | « chrome/browser/resources/app_list/start_page.html ('k') | chrome/browser/ui/app_list/start_page_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698