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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 enum LaunchMode { | 119 enum LaunchMode { |
120 AUDIO_HISTORY_ONLY, | 120 AUDIO_HISTORY_ONLY, |
121 HOTWORD_ONLY, | 121 HOTWORD_ONLY, |
122 HOTWORD_AND_AUDIO_HISTORY, | 122 HOTWORD_AND_AUDIO_HISTORY, |
123 SPEECH_TRAINING | 123 SPEECH_TRAINING |
124 }; | 124 }; |
125 void LaunchHotwordAudioVerificationApp(const LaunchMode& launch_mode); | 125 void LaunchHotwordAudioVerificationApp(const LaunchMode& launch_mode); |
126 virtual LaunchMode GetHotwordAudioVerificationLaunchMode(); | 126 virtual LaunchMode GetHotwordAudioVerificationLaunchMode(); |
127 | 127 |
128 private: | 128 private: |
| 129 // Returns the ID of the extension that may need to be reinstalled. |
| 130 std::string ReinstalledExtensionId(); |
| 131 |
129 Profile* profile_; | 132 Profile* profile_; |
130 | 133 |
131 PrefChangeRegistrar pref_registrar_; | 134 PrefChangeRegistrar pref_registrar_; |
132 | 135 |
133 content::NotificationRegistrar registrar_; | 136 content::NotificationRegistrar registrar_; |
134 | 137 |
135 // For observing the ExtensionRegistry. | 138 // For observing the ExtensionRegistry. |
136 ScopedObserver<extensions::ExtensionRegistry, | 139 ScopedObserver<extensions::ExtensionRegistry, |
137 extensions::ExtensionRegistryObserver> | 140 extensions::ExtensionRegistryObserver> |
138 extension_registry_observer_; | 141 extension_registry_observer_; |
139 | 142 |
140 scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_; | 143 scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_; |
141 | 144 |
142 HotwordClient* client_; | 145 HotwordClient* client_; |
143 int error_message_; | 146 int error_message_; |
144 bool reinstall_pending_; | 147 bool reinstall_pending_; |
145 | 148 |
146 base::WeakPtrFactory<HotwordService> weak_factory_; | 149 base::WeakPtrFactory<HotwordService> weak_factory_; |
147 | 150 |
148 // Stores the launch mode for the Hotword Audio Verification App. | 151 // Stores the launch mode for the Hotword Audio Verification App. |
149 LaunchMode hotword_audio_verification_launch_mode_; | 152 LaunchMode hotword_audio_verification_launch_mode_; |
150 | 153 |
151 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 154 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
152 }; | 155 }; |
153 | 156 |
154 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 157 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
OLD | NEW |