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

Side by Side Diff: chrome/browser/search/hotword_service.h

Issue 1011813006: Make availability of hotword hardware known to hotword component extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Always returns true. 63 // Always returns true.
64 // TODO(amistry): Remove this. 64 // TODO(amistry): Remove this.
65 static bool IsExperimentalHotwordingEnabled(); 65 static bool IsExperimentalHotwordingEnabled();
66 66
67 // Returns true if hotwording hardware is available.
68 static bool IsHotwordHardwareAvailable();
69
67 explicit HotwordService(Profile* profile); 70 explicit HotwordService(Profile* profile);
68 ~HotwordService() override; 71 ~HotwordService() override;
69 72
70 // Overridden from ExtensionRegisterObserver: 73 // Overridden from ExtensionRegisterObserver:
71 void OnExtensionInstalled(content::BrowserContext* browser_context, 74 void OnExtensionInstalled(content::BrowserContext* browser_context,
72 const extensions::Extension* extension, 75 const extensions::Extension* extension,
73 bool is_update) override; 76 bool is_update) override;
74 void OnExtensionUninstalled(content::BrowserContext* browser_context, 77 void OnExtensionUninstalled(content::BrowserContext* browser_context,
75 const extensions::Extension* extension, 78 const extensions::Extension* extension,
76 extensions::UninstallReason reason) override; 79 extensions::UninstallReason reason) override;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 223
221 // The WeakPtrFactory should be the last member, so the weak pointer 224 // The WeakPtrFactory should be the last member, so the weak pointer
222 // gets invalidated before the destructors for other members run, 225 // gets invalidated before the destructors for other members run,
223 // to avoid callbacks into a half-destroyed object. 226 // to avoid callbacks into a half-destroyed object.
224 base::WeakPtrFactory<HotwordService> weak_factory_; 227 base::WeakPtrFactory<HotwordService> weak_factory_;
225 228
226 DISALLOW_COPY_AND_ASSIGN(HotwordService); 229 DISALLOW_COPY_AND_ASSIGN(HotwordService);
227 }; 230 };
228 231
229 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 232 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/hotword/state_manager.js ('k') | chrome/browser/search/hotword_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698