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 21 matching lines...) Expand all Loading... | |
32 | 32 |
33 // Provides an interface for the Hotword component that does voice triggered | 33 // Provides an interface for the Hotword component that does voice triggered |
34 // search. | 34 // search. |
35 class HotwordService : public content::NotificationObserver, | 35 class HotwordService : public content::NotificationObserver, |
36 public extensions::ExtensionRegistryObserver, | 36 public extensions::ExtensionRegistryObserver, |
37 public KeyedService { | 37 public KeyedService { |
38 public: | 38 public: |
39 // Returns true if the hotword supports the current system language. | 39 // Returns true if the hotword supports the current system language. |
40 static bool DoesHotwordSupportLanguage(Profile* profile); | 40 static bool DoesHotwordSupportLanguage(Profile* profile); |
41 | 41 |
42 // Returns true is the "enable-experimental-hotwording" flag is set. | |
Matt Giuca
2014/08/14 07:45:23
s/is/if/
Jun Mukai
2014/08/14 22:10:08
No one explains what is experimental hotwording, a
Anand Mistry (off Chromium)
2014/08/15 00:14:51
Added a small blurb to chrome/common/chrome_switch
Anand Mistry (off Chromium)
2014/08/15 00:14:51
Done.
| |
43 static bool IsExperimentalHotwordingEnabled(); | |
44 | |
42 explicit HotwordService(Profile* profile); | 45 explicit HotwordService(Profile* profile); |
43 virtual ~HotwordService(); | 46 virtual ~HotwordService(); |
44 | 47 |
45 // Overridden from content::NotificationObserver: | 48 // Overridden from content::NotificationObserver: |
46 virtual void Observe(int type, | 49 virtual void Observe(int type, |
47 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
48 const content::NotificationDetails& details) OVERRIDE; | 51 const content::NotificationDetails& details) OVERRIDE; |
49 | 52 |
50 // Overridden from ExtensionRegisterObserver: | 53 // Overridden from ExtensionRegisterObserver: |
51 virtual void OnExtensionInstalled( | 54 virtual void OnExtensionInstalled( |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 HotwordClient* client_; | 123 HotwordClient* client_; |
121 int error_message_; | 124 int error_message_; |
122 bool reinstall_pending_; | 125 bool reinstall_pending_; |
123 | 126 |
124 base::WeakPtrFactory<HotwordService> weak_factory_; | 127 base::WeakPtrFactory<HotwordService> weak_factory_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 129 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
127 }; | 130 }; |
128 | 131 |
129 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 132 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
OLD | NEW |