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

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

Issue 69813002: Adds the speech recognition button to the app-list searchbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 1 month 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 /** 61 /**
62 * Sets the recommended apps. 62 * Sets the recommended apps.
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 /**
70 * Invoked when the app-list bubble is shown.
71 */
69 function onAppListShown() { 72 function onAppListShown() {
70 speechManager.start(); 73 speechManager.start();
71 } 74 }
72 75
76 /**
77 * Invoked when the app-list bubble is hidden.
78 */
73 function onAppListHidden() { 79 function onAppListHidden() {
74 speechManager.stop(); 80 speechManager.stop();
75 } 81 }
76 82
83 /**
84 * Invoked when the user explicitly wants to toggle the speech recognition
85 * state.
86 */
87 function toggleSpeechRecognition() {
88 speechManager.toggleSpeechRecognition();
89 }
90
77 return { 91 return {
78 initialize: initialize, 92 initialize: initialize,
79 setRecommendedApps: setRecommendedApps, 93 setRecommendedApps: setRecommendedApps,
80 onAppListShown: onAppListShown, 94 onAppListShown: onAppListShown,
81 onAppListHidden: onAppListHidden 95 onAppListHidden: onAppListHidden,
96 toggleSpeechRecognition: toggleSpeechRecognition
82 }; 97 };
83 }); 98 });
84 99
85 document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); 100 document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
86 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