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_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // This will kick off the monitor that calls OnUpdateAudioDevices when the | 35 // This will kick off the monitor that calls OnUpdateAudioDevices when the |
36 // number of audio devices changes (or is initialized). It needs to be a | 36 // number of audio devices changes (or is initialized). It needs to be a |
37 // separate function so it can be called after the service is initialized | 37 // separate function so it can be called after the service is initialized |
38 // (i.e., after startup). The monitor can't be initialized during startup | 38 // (i.e., after startup). The monitor can't be initialized during startup |
39 // because it would slow down startup too much so it is delayed and not | 39 // because it would slow down startup too much so it is delayed and not |
40 // called until it's needed by the webui in browser_options_handler. | 40 // called until it's needed by the webui in browser_options_handler. |
41 void UpdateMicrophoneState(); | 41 void UpdateMicrophoneState(); |
42 | 42 |
43 private: | 43 private: |
44 friend struct DefaultSingletonTraits<HotwordServiceFactory>; | 44 friend struct base::DefaultSingletonTraits<HotwordServiceFactory>; |
45 | 45 |
46 HotwordServiceFactory(); | 46 HotwordServiceFactory(); |
47 ~HotwordServiceFactory() override; | 47 ~HotwordServiceFactory() override; |
48 | 48 |
49 // Overrides from BrowserContextKeyedServiceFactory: | 49 // Overrides from BrowserContextKeyedServiceFactory: |
50 void RegisterProfilePrefs( | 50 void RegisterProfilePrefs( |
51 user_prefs::PrefRegistrySyncable* registry) override; | 51 user_prefs::PrefRegistrySyncable* registry) override; |
52 KeyedService* BuildServiceInstanceFor( | 52 KeyedService* BuildServiceInstanceFor( |
53 content::BrowserContext* context) const override; | 53 content::BrowserContext* context) const override; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory); | 55 DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory); |
56 }; | 56 }; |
57 | 57 |
58 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ | 58 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ |
OLD | NEW |