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

Side by Side Diff: chrome/browser/extensions/api/hotword_private/hotword_private_api.h

Issue 1047973003: Notify hotwording extension of microphone state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/hotword_private/hotword_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/hotword_private/hotword_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698