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 26 matching lines...) Expand all Loading... |
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(); | 45 void OnSpeakerModelExists(); |
46 | 46 |
| 47 void OnMicrophoneStateChanged(bool enabled); |
| 48 |
47 private: | 49 private: |
48 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; | 50 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; |
49 | 51 |
50 void SignalEvent(const std::string& event_name); | 52 void SignalEvent(const std::string& event_name); |
| 53 void SignalEvent(const std::string& event_name, |
| 54 scoped_ptr<base::ListValue> args); |
51 | 55 |
52 Profile* profile_; | 56 Profile* profile_; |
53 PrefChangeRegistrar pref_change_registrar_; | 57 PrefChangeRegistrar pref_change_registrar_; |
54 }; | 58 }; |
55 | 59 |
56 | 60 |
57 class HotwordPrivateSetEnabledFunction : public ChromeSyncExtensionFunction { | 61 class HotwordPrivateSetEnabledFunction : public ChromeSyncExtensionFunction { |
58 public: | 62 public: |
59 DECLARE_EXTENSION_FUNCTION("hotwordPrivate.setEnabled", | 63 DECLARE_EXTENSION_FUNCTION("hotwordPrivate.setEnabled", |
60 HOTWORDPRIVATE_SETENABLED) | 64 HOTWORDPRIVATE_SETENABLED) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 protected: | 251 protected: |
248 ~HotwordPrivateSpeakerModelExistsResultFunction() override {} | 252 ~HotwordPrivateSpeakerModelExistsResultFunction() override {} |
249 | 253 |
250 // ExtensionFunction: | 254 // ExtensionFunction: |
251 bool RunSync() override; | 255 bool RunSync() override; |
252 }; | 256 }; |
253 | 257 |
254 } // namespace extensions | 258 } // namespace extensions |
255 | 259 |
256 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ | 260 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ |
OLD | NEW |