Chromium Code Reviews| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 protected: | 56 protected: |
| 57 ~HotwordWebstoreInstaller() override {} | 57 ~HotwordWebstoreInstaller() override {} |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Returns true if the hotword supports the current system language. | 60 // Returns true if the hotword supports the current system language. |
| 61 static bool DoesHotwordSupportLanguage(Profile* profile); | 61 static bool DoesHotwordSupportLanguage(Profile* profile); |
| 62 | 62 |
| 63 // Returns true if the "enable-experimental-hotwording" flag is set. | 63 // Returns true if the "enable-experimental-hotwording" flag is set. |
| 64 static bool IsExperimentalHotwordingEnabled(); | 64 static bool IsExperimentalHotwordingEnabled(); |
| 65 | 65 |
| 66 // Returns true if hotwording hardware is available. | |
| 67 static bool IsHotwordHardwareAvailable(); | |
|
kcarattini
2015/03/17 01:38:41
Why is this is HotwordService and not HotwordServi
Anand Mistry (off Chromium)
2015/03/17 02:54:47
I think a lot of what's currently in the factory r
| |
| 68 | |
| 66 explicit HotwordService(Profile* profile); | 69 explicit HotwordService(Profile* profile); |
| 67 ~HotwordService() override; | 70 ~HotwordService() override; |
| 68 | 71 |
| 69 // Overridden from ExtensionRegisterObserver: | 72 // Overridden from ExtensionRegisterObserver: |
| 70 void OnExtensionInstalled(content::BrowserContext* browser_context, | 73 void OnExtensionInstalled(content::BrowserContext* browser_context, |
| 71 const extensions::Extension* extension, | 74 const extensions::Extension* extension, |
| 72 bool is_update) override; | 75 bool is_update) override; |
| 73 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 76 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 74 const extensions::Extension* extension, | 77 const extensions::Extension* extension, |
| 75 extensions::UninstallReason reason) override; | 78 extensions::UninstallReason reason) override; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 | 222 |
| 220 // The WeakPtrFactory should be the last member, so the weak pointer | 223 // The WeakPtrFactory should be the last member, so the weak pointer |
| 221 // gets invalidated before the destructors for other members run, | 224 // gets invalidated before the destructors for other members run, |
| 222 // to avoid callbacks into a half-destroyed object. | 225 // to avoid callbacks into a half-destroyed object. |
| 223 base::WeakPtrFactory<HotwordService> weak_factory_; | 226 base::WeakPtrFactory<HotwordService> weak_factory_; |
| 224 | 227 |
| 225 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 228 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
| 226 }; | 229 }; |
| 227 | 230 |
| 228 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 231 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
| OLD | NEW |