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

Unified Diff: chrome/browser/extensions/api/hotword_private/hotword_private_api.h

Issue 686333002: Hotword Private API: Adds speech training functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests for Finalize Speaker Model Created 6 years, 2 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
Index: chrome/browser/extensions/api/hotword_private/hotword_private_api.h
diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_api.h b/chrome/browser/extensions/api/hotword_private/hotword_private_api.h
index 790a88f39daeb19d90da4a0aea12b683a654f89f..c628ab3745b928bc7f3543b29c705964e0325845 100644
--- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.h
+++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.h
@@ -34,6 +34,10 @@ class HotwordPrivateEventService : public BrowserContextKeyedAPI {
void OnHotwordSessionStopped();
+ void OnHotwordTriggered();
+
+ void OnFinalizeSpeakerModel();
+
private:
friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>;
@@ -133,6 +137,45 @@ class HotwordPrivateGetLaunchStateFunction :
bool RunSync() override;
};
+class HotwordPrivateStartTrainingFunction :
+ public ChromeSyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("hotwordPrivate.startTraining",
+ HOTWORDPRIVATE_STARTTRAINING)
+
+ protected:
+ ~HotwordPrivateStartTrainingFunction() override {}
+
+ // ExtensionFunction:
+ bool RunSync() override;
+};
+
+class HotwordPrivateFinalizeSpeakerModelFunction :
+ public ChromeSyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("hotwordPrivate.finalizeSpeakerModel",
+ HOTWORDPRIVATE_FINALIZESPEAKERMODEL)
+
+ protected:
+ ~HotwordPrivateFinalizeSpeakerModelFunction() override {}
+
+ // ExtensionFunction:
+ bool RunSync() override;
+};
+
+class HotwordPrivateStopTrainingFunction :
+ public ChromeSyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("hotwordPrivate.stopTraining",
+ HOTWORDPRIVATE_STOPTRAINING)
+
+ protected:
+ ~HotwordPrivateStopTrainingFunction() override {}
+
+ // ExtensionFunction:
+ bool RunSync() override;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_

Powered by Google App Engine
This is Rietveld 408576698