OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTORY_H
_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTORY_H
_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTORY_H
_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTORY_H
_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" | 9 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" |
10 | 10 |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 class TabCaptureRegistry; | 15 class TabCaptureRegistry; |
16 | 16 |
17 class TabCaptureRegistryFactory : public ProfileKeyedServiceFactory { | 17 class TabCaptureRegistryFactory : public BrowserContextKeyedServiceFactory { |
18 public: | 18 public: |
19 static TabCaptureRegistry* GetForProfile(Profile* profile); | 19 static TabCaptureRegistry* GetForProfile(Profile* profile); |
20 | 20 |
21 static TabCaptureRegistryFactory* GetInstance(); | 21 static TabCaptureRegistryFactory* GetInstance(); |
22 | 22 |
23 // ProfileKeyedBaseFactory: | 23 // BrowserContextKeyedBaseFactory: |
24 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; | 24 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; |
25 | 25 |
26 private: | 26 private: |
27 friend struct DefaultSingletonTraits<TabCaptureRegistryFactory>; | 27 friend struct DefaultSingletonTraits<TabCaptureRegistryFactory>; |
28 | 28 |
29 TabCaptureRegistryFactory(); | 29 TabCaptureRegistryFactory(); |
30 virtual ~TabCaptureRegistryFactory(); | 30 virtual ~TabCaptureRegistryFactory(); |
31 | 31 |
32 // ProfileKeyedServiceFactory: | 32 // BrowserContextKeyedServiceFactory: |
33 virtual ProfileKeyedService* BuildServiceInstanceFor( | 33 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
34 content::BrowserContext* profile) const OVERRIDE; | 34 content::BrowserContext* profile) const OVERRIDE; |
35 virtual content::BrowserContext* GetBrowserContextToUse( | 35 virtual content::BrowserContext* GetBrowserContextToUse( |
36 content::BrowserContext* context) const OVERRIDE; | 36 content::BrowserContext* context) const OVERRIDE; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(TabCaptureRegistryFactory); | 38 DISALLOW_COPY_AND_ASSIGN(TabCaptureRegistryFactory); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace extensions | 41 } // namespace extensions |
42 | 42 |
43 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTOR
Y_H_ | 43 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_FACTOR
Y_H_ |
OLD | NEW |