OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SEARCH_HOTWORD_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual bool IsHotwordAllowed(); | 69 virtual bool IsHotwordAllowed(); |
70 | 70 |
71 // Checks if the user has opted into audio logging. Returns true if the user | 71 // Checks if the user has opted into audio logging. Returns true if the user |
72 // is opted in, false otherwise.. | 72 // is opted in, false otherwise.. |
73 bool IsOptedIntoAudioLogging(); | 73 bool IsOptedIntoAudioLogging(); |
74 | 74 |
75 // Control the state of the hotword extension. | 75 // Control the state of the hotword extension. |
76 void EnableHotwordExtension(ExtensionService* extension_service); | 76 void EnableHotwordExtension(ExtensionService* extension_service); |
77 void DisableHotwordExtension(ExtensionService* extension_service); | 77 void DisableHotwordExtension(ExtensionService* extension_service); |
78 | 78 |
| 79 // Handles launching the Hotword Audio Verification extension when the user |
| 80 // turns it on via the settings menu. |
| 81 void OnHotwordAlwaysOnSearchEnabledChanged(const std::string& pref_name); |
| 82 |
79 // Handles enabling/disabling the hotword extension when the user | 83 // Handles enabling/disabling the hotword extension when the user |
80 // turns it off via the settings menu. | 84 // turns it off via the settings menu. |
81 void OnHotwordSearchEnabledChanged(const std::string& pref_name); | 85 void OnHotwordSearchEnabledChanged(const std::string& pref_name); |
82 | 86 |
83 // Called to handle the hotword session from |client|. | 87 // Called to handle the hotword session from |client|. |
84 void RequestHotwordSession(HotwordClient* client); | 88 void RequestHotwordSession(HotwordClient* client); |
85 void StopHotwordSession(HotwordClient* client); | 89 void StopHotwordSession(HotwordClient* client); |
86 HotwordClient* client() { return client_; } | 90 HotwordClient* client() { return client_; } |
87 | 91 |
88 // Checks if the current version of the hotword extension should be | 92 // Checks if the current version of the hotword extension should be |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 HotwordClient* client_; | 127 HotwordClient* client_; |
124 int error_message_; | 128 int error_message_; |
125 bool reinstall_pending_; | 129 bool reinstall_pending_; |
126 | 130 |
127 base::WeakPtrFactory<HotwordService> weak_factory_; | 131 base::WeakPtrFactory<HotwordService> weak_factory_; |
128 | 132 |
129 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 133 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
130 }; | 134 }; |
131 | 135 |
132 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 136 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
OLD | NEW |