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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_
8 #include "base/memory/singleton.h"
9 #include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h"
13 namespace extensions {
17 class DialAPIFactory : public RefcountedBrowserContextKeyedServiceFactory {
19 static scoped_refptr<DialAPI> GetForProfile(Profile* profile);
21 static DialAPIFactory* GetInstance();
24 friend struct DefaultSingletonTraits<DialAPIFactory>;
27 virtual ~DialAPIFactory();
29 // BrowserContextKeyedServiceFactory:
30 virtual scoped_refptr<RefcountedBrowserContextKeyedService>
31 BuildServiceInstanceFor(content::BrowserContext* profile) const OVERRIDE;
32 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
33 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
35 DISALLOW_COPY_AND_ASSIGN(DialAPIFactory);
38 } // namespace extensions
40 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_FACTORY_H_