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 53f6170c75725d14147381f8c49cc5dd86482d9c..9f5b89705f74385ec6ecd25d32f4e224cc08ccc4 100644 |
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.cc |
@@ -17,6 +17,10 @@ |
namespace extensions { |
+namespace hotword_private_constants { |
+const char kHotwordServiceUnavailable[] = "Hotword Service is unavailable."; |
+} // hotword_private_constants |
+ |
namespace OnEnabledChanged = |
api::hotword_private::OnEnabledChanged; |
@@ -138,4 +142,21 @@ bool HotwordPrivateNotifyHotwordRecognitionFunction::RunSync() { |
return true; |
} |
+bool HotwordPrivateGetLaunchStateFunction::RunSync() { |
+ api::hotword_private::LaunchState result; |
+ |
+ HotwordService* hotword_service = |
+ HotwordServiceFactory::GetForProfile(GetProfile()); |
+ if (!hotword_service) { |
+ error_ = hotword_private_constants::kHotwordServiceUnavailable; |
rpetterson
2014/09/10 23:04:22
This should probably be defined in resources.grd r
kcarattini
2014/09/11 00:08:29
Does this get exposed to the user? I thought it wa
benwells
2014/09/11 19:27:40
That's basically right - these are developer facin
rpetterson
2014/09/11 19:33:32
Good to know, thanks!
|
+ return false; |
+ } else { |
+ result.launch_mode = |
+ hotword_service->GetHotwordAudioVerificationLaunchMode(); |
+ } |
+ |
+ SetResult(result.ToValue().release()); |
+ return true; |
+} |
+ |
} // namespace extensions |