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.
5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_
6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_
8 #include "base/lazy_instance.h"
9 #include "base/macros.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
18 namespace extensions
{
19 class PrinterProviderAPI
;
22 namespace extensions
{
24 // Factory for PrinterProviderAPI.
25 class PrinterProviderAPIFactory
: public BrowserContextKeyedServiceFactory
{
27 static PrinterProviderAPIFactory
* GetInstance();
29 PrinterProviderAPI
* GetForBrowserContext(content::BrowserContext
* context
);
32 friend struct base::DefaultLazyInstanceTraits
<PrinterProviderAPIFactory
>;
34 PrinterProviderAPIFactory();
35 ~PrinterProviderAPIFactory() override
;
37 // BrowserContextKeyedServiceFactory implementation:
38 KeyedService
* BuildServiceInstanceFor(
39 content::BrowserContext
* context
) const override
;
40 content::BrowserContext
* GetBrowserContextToUse(
41 content::BrowserContext
* context
) const override
;
43 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPIFactory
);
46 } // namespace extensions
48 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_FACTORY_H_