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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 69813002: Adds the speech recognition button to the app-list searchbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 8a4f444792181d355f5f22d7ba423172f3273959..c4f4adcd180ddceda0611a8fd514103ffd9faa21 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -149,10 +149,21 @@ void StartPageService::RemoveObserver(StartPageObserver* observer) {
observers_.RemoveObserver(observer);
}
+void StartPageService::ToggleSpeechRecognition() {
+ contents_->GetWebUI()->CallJavascriptFunction(
+ "appList.startPage.toggleSpeechRecognition");
+}
+
void StartPageService::OnSearch(const base::string16& query) {
FOR_EACH_OBSERVER(StartPageObserver, observers_, OnSearch(query));
}
+void StartPageService::OnSpeechRecognitionStateChanged(bool recognizing) {
+ FOR_EACH_OBSERVER(StartPageObserver,
+ observers_,
+ OnSpeechRecognitionStateChanged(recognizing));
+}
+
void StartPageService::Shutdown() {
contents_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698