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

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

Issue 158143002: Fine tuned availability of hotword plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/ui/app_list/start_page_service.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 2de89adaa9313c2067ef9c66761a1d0ca4b89fd4..0c2b2746c62c1282a0ead2373cde5a592292b965 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -35,7 +35,6 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#include "grit/theme_resources.h"
-#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/app_list_view_delegate_observer.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/speech_ui_model.h"
@@ -96,15 +95,10 @@ AppListViewDelegate::AppListViewDelegate(Profile* profile,
RegisterForNotifications();
g_browser_process->profile_manager()->GetProfileInfoCache().AddObserver(this);
- // Hotword listening is on by default in ChromeOS right now. Here shouldn't
- // use the current state in the webui because it will be changed to 'hotword
- // listening' state from 'ready' after the view is initialized.
+ app_list::StartPageService* service =
+ app_list::StartPageService::Get(profile_);
speech_ui_.reset(new app_list::SpeechUIModel(
-#if defined(OS_CHROMEOS)
- app_list::switches::IsVoiceSearchEnabled() ?
- app_list::SPEECH_RECOGNITION_HOTWORD_LISTENING :
-#endif
- app_list::SPEECH_RECOGNITION_OFF));
+ service ? service->state() : app_list::SPEECH_RECOGNITION_OFF));
#if defined(GOOGLE_CHROME_BUILD)
speech_ui_->set_logo(
@@ -113,8 +107,6 @@ AppListViewDelegate::AppListViewDelegate(Profile* profile,
#endif
OnProfileChanged(); // sets model_
- app_list::StartPageService* service =
- app_list::StartPageService::Get(profile_);
if (service)
service->AddObserver(this);
}
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/ui/app_list/start_page_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698