Index: chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
index 2de65c89c42932bd1e8bd662cb6944e222dbd711..db6db77b3068dfbd8c683b616104c4a280f135c9 100644 |
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/search/hotword_client.h" |
#include "chrome/browser/search/hotword_service.h" |
#include "chrome/browser/search/hotword_service_factory.h" |
+#include "chrome/browser/ui/app_list/app_list_service.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "extensions/browser/event_router.h" |
@@ -157,8 +158,17 @@ bool HotwordPrivateSetHotwordSessionStateFunction::RunSync() { |
bool HotwordPrivateNotifyHotwordRecognitionFunction::RunSync() { |
HotwordService* hotword_service = |
HotwordServiceFactory::GetForProfile(GetProfile()); |
- if (hotword_service && hotword_service->client()) |
- hotword_service->client()->OnHotwordRecognized(); |
+ if (hotword_service) { |
+ if (hotword_service->client()) { |
+ hotword_service->client()->OnHotwordRecognized(); |
+ } else if (HotwordService::IsExperimentalHotwordingEnabled() && |
+ hotword_service->IsAlwaysOnEnabled()) { |
+ AppListService* app_list_service = AppListService::Get( |
+ chrome::HOST_DESKTOP_TYPE_NATIVE); |
tapted
2014/10/09 03:37:00
you might want AppListService::Get(GetCurrentBrows
Anand Mistry (off Chromium)
2014/10/13 21:51:59
Done. But note, priority is ChromeOS. We're not ta
|
+ CHECK(app_list_service); |
+ app_list_service->ShowForVoiceSearch(GetProfile()); |
+ } |
+ } |
return true; |
} |