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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Return true if this profile corresponds to the currently active user. | 142 // Return true if this profile corresponds to the currently active user. |
143 bool UserIsActive(); | 143 bool UserIsActive(); |
144 | 144 |
145 // Returns a pointer to the audio history handler. | 145 // Returns a pointer to the audio history handler. |
146 HotwordAudioHistoryHandler* GetAudioHistoryHandler(); | 146 HotwordAudioHistoryHandler* GetAudioHistoryHandler(); |
147 | 147 |
148 // Sets the audio history handler. Used for tests. | 148 // Sets the audio history handler. Used for tests. |
149 void SetAudioHistoryHandler(HotwordAudioHistoryHandler* handler); | 149 void SetAudioHistoryHandler(HotwordAudioHistoryHandler* handler); |
150 | 150 |
| 151 // Turn off the currently enabled version of hotwording if one exists. |
| 152 void DisableHotwordPreferences(); |
| 153 |
151 private: | 154 private: |
152 class HotwordUserSessionStateObserver; | 155 class HotwordUserSessionStateObserver; |
153 | 156 |
154 // Callback for webstore extension installer. | 157 // Callback for webstore extension installer. |
155 void InstalledFromWebstoreCallback( | 158 void InstalledFromWebstoreCallback( |
156 int num_tries, | 159 int num_tries, |
157 bool success, | 160 bool success, |
158 const std::string& error, | 161 const std::string& error, |
159 extensions::webstore_install::Result result); | 162 extensions::webstore_install::Result result); |
160 | 163 |
(...skipping 30 matching lines...) Expand all Loading... |
191 | 194 |
192 // The WeakPtrFactory should be the last member, so the weak pointer | 195 // The WeakPtrFactory should be the last member, so the weak pointer |
193 // gets invalidated before the destructors for other members run, | 196 // gets invalidated before the destructors for other members run, |
194 // to avoid callbacks into a half-destroyed object. | 197 // to avoid callbacks into a half-destroyed object. |
195 base::WeakPtrFactory<HotwordService> weak_factory_; | 198 base::WeakPtrFactory<HotwordService> weak_factory_; |
196 | 199 |
197 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 200 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
198 }; | 201 }; |
199 | 202 |
200 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 203 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
OLD | NEW |