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

Side by Side Diff: chrome/browser/resources/app_list/start_page.js

Issue 149753002: Enables the 'hotword not listening' icon in the search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix breaks Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /** 5 /**
6 * @fileoverview App launcher start page implementation. 6 * @fileoverview App launcher start page implementation.
7 */ 7 */
8 8
9 <include src="recommended_apps.js"/> 9 <include src="recommended_apps.js"/>
10 <include src="speech_manager.js"/> 10 <include src="speech_manager.js"/>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 * @param {Array.<Object>} apps An array of app info dictionary. 63 * @param {Array.<Object>} apps An array of app info dictionary.
64 */ 64 */
65 function setRecommendedApps(apps) { 65 function setRecommendedApps(apps) {
66 $('start-page').setRecommendedApps(apps); 66 $('start-page').setRecommendedApps(apps);
67 } 67 }
68 68
69 /** 69 /**
70 * Invoked when the app-list bubble is shown. 70 * Invoked when the app-list bubble is shown.
71 */ 71 */
72 function onAppListShown() { 72 function onAppListShown() {
73 speechManager.start(); 73 speechManager.onShown();
74 } 74 }
75 75
76 /** 76 /**
77 * Invoked when the app-list bubble is hidden. 77 * Invoked when the app-list bubble is hidden.
78 */ 78 */
79 function onAppListHidden() { 79 function onAppListHidden() {
80 speechManager.stop(); 80 speechManager.onHidden();
81 } 81 }
82 82
83 /** 83 /**
84 * Invoked when the user explicitly wants to toggle the speech recognition 84 * Invoked when the user explicitly wants to toggle the speech recognition
85 * state. 85 * state.
86 */ 86 */
87 function toggleSpeechRecognition() { 87 function toggleSpeechRecognition() {
88 speechManager.toggleSpeechRecognition(); 88 speechManager.toggleSpeechRecognition();
89 } 89 }
90 90
91 return { 91 return {
92 initialize: initialize, 92 initialize: initialize,
93 setRecommendedApps: setRecommendedApps, 93 setRecommendedApps: setRecommendedApps,
94 onAppListShown: onAppListShown, 94 onAppListShown: onAppListShown,
95 onAppListHidden: onAppListHidden, 95 onAppListHidden: onAppListHidden,
96 toggleSpeechRecognition: toggleSpeechRecognition 96 toggleSpeechRecognition: toggleSpeechRecognition
97 }; 97 };
98 }); 98 });
99 99
100 document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); 100 document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
101 document.addEventListener('DOMContentLoaded', appList.startPage.initialize); 101 document.addEventListener('DOMContentLoaded', appList.startPage.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/app_list/speech_manager.js ('k') | chrome/browser/ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698