| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ |
| 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ | 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace extensions { | 22 namespace extensions { |
| 23 | 23 |
| 24 // Factory for PrinterProviderAPI. | 24 // Factory for PrinterProviderAPI. |
| 25 class PrinterProviderAPIFactory : public BrowserContextKeyedServiceFactory { | 25 class PrinterProviderAPIFactory : public BrowserContextKeyedServiceFactory { |
| 26 public: | 26 public: |
| 27 static PrinterProviderAPIFactory* GetInstance(); | 27 static PrinterProviderAPIFactory* GetInstance(); |
| 28 | 28 |
| 29 PrinterProviderAPI* GetForBrowserContext(content::BrowserContext* context); | 29 PrinterProviderAPI* GetForBrowserContext(content::BrowserContext* context); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 friend struct base::DefaultLazyInstanceTraits<PrinterProviderAPIFactory>; | 32 friend struct base::LazyInstanceTraitsBase<PrinterProviderAPIFactory>; |
| 33 | 33 |
| 34 PrinterProviderAPIFactory(); | 34 PrinterProviderAPIFactory(); |
| 35 ~PrinterProviderAPIFactory() override; | 35 ~PrinterProviderAPIFactory() override; |
| 36 | 36 |
| 37 // BrowserContextKeyedServiceFactory implementation: | 37 // BrowserContextKeyedServiceFactory implementation: |
| 38 KeyedService* BuildServiceInstanceFor( | 38 KeyedService* BuildServiceInstanceFor( |
| 39 content::BrowserContext* context) const override; | 39 content::BrowserContext* context) const override; |
| 40 content::BrowserContext* GetBrowserContextToUse( | 40 content::BrowserContext* GetBrowserContextToUse( |
| 41 content::BrowserContext* context) const override; | 41 content::BrowserContext* context) const override; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPIFactory); | 43 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPIFactory); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace extensions | 46 } // namespace extensions |
| 47 | 47 |
| 48 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_
H_ | 48 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_
H_ |
| OLD | NEW |