OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ |
7 | 7 |
8 #include "base/prefs/pref_change_registrar.h" | 8 #include "base/prefs/pref_change_registrar.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 void OnHotwordSessionStopped(); | 35 void OnHotwordSessionStopped(); |
36 | 36 |
37 void OnHotwordTriggered(); | 37 void OnHotwordTriggered(); |
38 | 38 |
39 void OnFinalizeSpeakerModel(); | 39 void OnFinalizeSpeakerModel(); |
40 | 40 |
41 void OnSpeakerModelSaved(); | 41 void OnSpeakerModelSaved(); |
42 | 42 |
43 void OnDeleteSpeakerModel(); | 43 void OnDeleteSpeakerModel(); |
44 | 44 |
| 45 void OnSpeakerModelExists(); |
| 46 |
45 private: | 47 private: |
46 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; | 48 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; |
47 | 49 |
48 void SignalEvent(const std::string& event_name); | 50 void SignalEvent(const std::string& event_name); |
49 | 51 |
50 Profile* profile_; | 52 Profile* profile_; |
51 PrefChangeRegistrar pref_change_registrar_; | 53 PrefChangeRegistrar pref_change_registrar_; |
52 }; | 54 }; |
53 | 55 |
54 | 56 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 231 |
230 protected: | 232 protected: |
231 ~HotwordPrivateGetAudioHistoryEnabledFunction() override {} | 233 ~HotwordPrivateGetAudioHistoryEnabledFunction() override {} |
232 | 234 |
233 // ExtensionFunction: | 235 // ExtensionFunction: |
234 bool RunAsync() override; | 236 bool RunAsync() override; |
235 | 237 |
236 void SetResultAndSendResponse(bool success, bool new_enabled_value); | 238 void SetResultAndSendResponse(bool success, bool new_enabled_value); |
237 }; | 239 }; |
238 | 240 |
| 241 class HotwordPrivateSpeakerModelExistsResultFunction : |
| 242 public ChromeSyncExtensionFunction { |
| 243 public: |
| 244 DECLARE_EXTENSION_FUNCTION("hotwordPrivate.speakerModelExistsResult", |
| 245 HOTWORDPRIVATE_SPEAKERMODELEXISTSRESULT) |
| 246 |
| 247 protected: |
| 248 ~HotwordPrivateSpeakerModelExistsResultFunction() override {} |
| 249 |
| 250 // ExtensionFunction: |
| 251 bool RunSync() override; |
| 252 }; |
| 253 |
239 } // namespace extensions | 254 } // namespace extensions |
240 | 255 |
241 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ | 256 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ |
OLD | NEW |