15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/memory/singleton.h"
990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class Profile;
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace extensions {
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class BluetoothAPI;
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class BluetoothAPIFactory : public BrowserContextKeyedServiceFactory {
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public:
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  static BluetoothAPI* GetForProfile(Profile* profile);
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  static BluetoothAPIFactory* GetInstance();
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) private:
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  friend struct DefaultSingletonTraits<BluetoothAPIFactory>;
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  BluetoothAPIFactory();
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~BluetoothAPIFactory();
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  // BrowserContextKeyedServiceFactory implementation.
3090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  virtual BrowserContextKeyedService* BuildServiceInstanceFor(
31c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      content::BrowserContext* profile) const OVERRIDE;
32c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  virtual content::BrowserContext* GetBrowserContextToUse(
33c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      content::BrowserContext* context) const OVERRIDE;
3490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace extensions
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif  // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_
41