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 |
}; |
}); |