OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ |
| 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_ |
| 7 |
| 8 #include "base/lazy_instance.h" |
| 9 #include "base/macros.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 11 |
| 12 class KeyedService; |
| 13 |
| 14 namespace content { |
| 15 class BrowserContext; |
| 16 } |
| 17 |
| 18 namespace extensions { |
| 19 class PrinterProviderAPI; |
| 20 } |
| 21 |
| 22 namespace extensions { |
| 23 |
| 24 // Factory for PrinterProviderAPI. |
| 25 class PrinterProviderAPIFactory : public BrowserContextKeyedServiceFactory { |
| 26 public: |
| 27 static PrinterProviderAPIFactory* GetInstance(); |
| 28 |
| 29 PrinterProviderAPI* GetForBrowserContext(content::BrowserContext* context); |
| 30 |
| 31 private: |
| 32 friend struct base::DefaultLazyInstanceTraits<PrinterProviderAPIFactory>; |
| 33 |
| 34 PrinterProviderAPIFactory(); |
| 35 ~PrinterProviderAPIFactory() override; |
| 36 |
| 37 // BrowserContextKeyedServiceFactory implementation: |
| 38 KeyedService* BuildServiceInstanceFor( |
| 39 content::BrowserContext* context) const override; |
| 40 content::BrowserContext* GetBrowserContextToUse( |
| 41 content::BrowserContext* context) const override; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPIFactory); |
| 44 }; |
| 45 |
| 46 } // namespace extensions |
| 47 |
| 48 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_
H_ |
OLD | NEW |