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

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

Issue 105773004: Introduces the speech recognition UI to app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: start_page existence Created 7 years 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/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 93ff48ca37d70c8ec4e38278f3ab1e9b10c5c2cf..ea702094511dba8d219dc4bf227db47d586dcfeb 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -35,6 +35,7 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#include "ui/app_list/search_box_model.h"
+#include "ui/app_list/speech_ui_model.h"
#if defined(USE_ASH)
#include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h"
@@ -276,12 +277,18 @@ void AppListViewDelegate::ShowForProfileByPath(
controller_->ShowForProfileByPath(profile_path);
}
-void AppListViewDelegate::OnSearch(const base::string16& query) {
- model_->search_box()->SetText(query);
+void AppListViewDelegate::OnSpeechResult(const base::string16& query,
+ bool is_final) {
+ model_->speech_ui()->SetSpeechResult(query, is_final);
}
-void AppListViewDelegate::OnSpeechRecognitionStateChanged(bool recognizing) {
- model_->search_box()->SetSpeechRecognitionButtonState(recognizing);
+void AppListViewDelegate::OnSpeechSoundLevelChanged(int16 level) {
+ model_->speech_ui()->UpdateSoundLevel(level);
+}
+
+void AppListViewDelegate::OnSpeechRecognitionStateChanged(
+ app_list::SpeechRecognitionState new_state) {
+ model_->speech_ui()->SetSpeechRecognitionState(new_state);
}
void AppListViewDelegate::Observe(

Powered by Google App Engine
This is Rietveld 408576698