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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Returns true if the "enable-experimental-hotwording" flag is set. | 42 // Returns true if the "enable-experimental-hotwording" flag is set. |
43 static bool IsExperimentalHotwordingEnabled(); | 43 static bool IsExperimentalHotwordingEnabled(); |
44 | 44 |
45 explicit HotwordService(Profile* profile); | 45 explicit HotwordService(Profile* profile); |
46 virtual ~HotwordService(); | 46 virtual ~HotwordService(); |
47 | 47 |
48 // Overridden from content::NotificationObserver: | 48 // Overridden from content::NotificationObserver: |
49 virtual void Observe(int type, | 49 virtual void Observe(int type, |
50 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
51 const content::NotificationDetails& details) OVERRIDE; | 51 const content::NotificationDetails& details) override; |
52 | 52 |
53 // Overridden from ExtensionRegisterObserver: | 53 // Overridden from ExtensionRegisterObserver: |
54 virtual void OnExtensionInstalled( | 54 virtual void OnExtensionInstalled( |
55 content::BrowserContext* browser_context, | 55 content::BrowserContext* browser_context, |
56 const extensions::Extension* extension, | 56 const extensions::Extension* extension, |
57 bool is_update) OVERRIDE; | 57 bool is_update) override; |
58 virtual void OnExtensionUninstalled( | 58 virtual void OnExtensionUninstalled( |
59 content::BrowserContext* browser_context, | 59 content::BrowserContext* browser_context, |
60 const extensions::Extension* extension, | 60 const extensions::Extension* extension, |
61 extensions::UninstallReason reason) OVERRIDE; | 61 extensions::UninstallReason reason) override; |
62 | 62 |
63 // Checks for whether all the necessary files have downloaded to allow for | 63 // Checks for whether all the necessary files have downloaded to allow for |
64 // using the extension. | 64 // using the extension. |
65 virtual bool IsServiceAvailable(); | 65 virtual bool IsServiceAvailable(); |
66 | 66 |
67 // Determine if hotwording is allowed in this profile based on field trials | 67 // Determine if hotwording is allowed in this profile based on field trials |
68 // and language. | 68 // and language. |
69 virtual bool IsHotwordAllowed(); | 69 virtual bool IsHotwordAllowed(); |
70 | 70 |
71 // Checks if the user has opted into audio logging. Returns true if the user | 71 // Checks if the user has opted into audio logging. Returns true if the user |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 base::WeakPtrFactory<HotwordService> weak_factory_; | 143 base::WeakPtrFactory<HotwordService> weak_factory_; |
144 | 144 |
145 // Stores the launch mode for the Hotword Audio Verification App. | 145 // Stores the launch mode for the Hotword Audio Verification App. |
146 LaunchMode hotword_audio_verification_launch_mode_; | 146 LaunchMode hotword_audio_verification_launch_mode_; |
147 | 147 |
148 DISALLOW_COPY_AND_ASSIGN(HotwordService); | 148 DISALLOW_COPY_AND_ASSIGN(HotwordService); |
149 }; | 149 }; |
150 | 150 |
151 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 151 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |
OLD | NEW |