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/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
10 #include "chrome/common/extensions/api/hotword_private.h" | 10 #include "chrome/common/extensions/api/hotword_private.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 void OnMicrophoneStateChanged(bool enabled); | 48 void OnMicrophoneStateChanged(bool enabled); |
49 | 49 |
50 private: | 50 private: |
51 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; | 51 friend class BrowserContextKeyedAPIFactory<HotwordPrivateEventService>; |
52 | 52 |
53 void SignalEvent(events::HistogramValue histogram_value, | 53 void SignalEvent(events::HistogramValue histogram_value, |
54 const std::string& event_name); | 54 const std::string& event_name); |
55 void SignalEvent(events::HistogramValue histogram_value, | 55 void SignalEvent(events::HistogramValue histogram_value, |
56 const std::string& event_name, | 56 const std::string& event_name, |
57 scoped_ptr<base::ListValue> args); | 57 std::unique_ptr<base::ListValue> args); |
58 | 58 |
59 Profile* profile_; | 59 Profile* profile_; |
60 PrefChangeRegistrar pref_change_registrar_; | 60 PrefChangeRegistrar pref_change_registrar_; |
61 }; | 61 }; |
62 | 62 |
63 | 63 |
64 class HotwordPrivateSetEnabledFunction : public ChromeSyncExtensionFunction { | 64 class HotwordPrivateSetEnabledFunction : public ChromeSyncExtensionFunction { |
65 public: | 65 public: |
66 DECLARE_EXTENSION_FUNCTION("hotwordPrivate.setEnabled", | 66 DECLARE_EXTENSION_FUNCTION("hotwordPrivate.setEnabled", |
67 HOTWORDPRIVATE_SETENABLED) | 67 HOTWORDPRIVATE_SETENABLED) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 protected: | 254 protected: |
255 ~HotwordPrivateSpeakerModelExistsResultFunction() override {} | 255 ~HotwordPrivateSpeakerModelExistsResultFunction() override {} |
256 | 256 |
257 // ExtensionFunction: | 257 // ExtensionFunction: |
258 bool RunSync() override; | 258 bool RunSync() override; |
259 }; | 259 }; |
260 | 260 |
261 } // namespace extensions | 261 } // namespace extensions |
262 | 262 |
263 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ | 263 #endif // CHROME_BROWSER_EXTENSIONS_API_HOTWORD_PRIVATE_HOTWORD_PRIVATE_API_H_ |
OLD | NEW |