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

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

Issue 809603003: Plumb preamble log data from the hotword extension into the speech recognizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 6 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
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | chrome/browser/ui/app_list/speech_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 741e2a8cd31b8b45130221ae77692e6ef43a8e31..897dca3ae4002b8e5a7913fda80b6aa49ff0a38f 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -43,6 +43,7 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
+#include "content/public/browser/speech_recognition_session_preamble.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_registry.h"
@@ -385,10 +386,11 @@ void AppListViewDelegate::OnHotwordStateChanged(bool started) {
}
}
-void AppListViewDelegate::OnHotwordRecognized() {
+void AppListViewDelegate::OnHotwordRecognized(
+ const scoped_refptr<content::SpeechRecognitionSessionPreamble>& preamble) {
DCHECK_EQ(app_list::SPEECH_RECOGNITION_HOTWORD_LISTENING,
speech_ui_->state());
- ToggleSpeechRecognition();
+ ToggleSpeechRecognitionForHotword(preamble);
}
void AppListViewDelegate::SigninManagerCreated(SigninManagerBase* manager) {
@@ -604,10 +606,15 @@ void AppListViewDelegate::OpenFeedback() {
}
void AppListViewDelegate::ToggleSpeechRecognition() {
+ ToggleSpeechRecognitionForHotword(nullptr);
+}
+
+void AppListViewDelegate::ToggleSpeechRecognitionForHotword(
+ const scoped_refptr<content::SpeechRecognitionSessionPreamble>& preamble) {
app_list::StartPageService* service =
app_list::StartPageService::Get(profile_);
if (service)
- service->ToggleSpeechRecognition();
+ service->ToggleSpeechRecognition(preamble);
// With the new hotword extension, stop the hotword session. With the launcher
// and NTP, this is unnecessary since the hotwording is implicitly stopped.
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | chrome/browser/ui/app_list/speech_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698