/chromium-webcl/src/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h

https://bitbucket.org/peixuan/chromium_r197479_base · C Header · 37 lines · 22 code · 11 blank · 4 comment · 0 complexity · 9d844f0142362cea394c2b51f3cb77c1 MD5 · raw file

  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.
  4. #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_
  5. #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_
  6. #include "base/memory/singleton.h"
  7. #include "chrome/browser/profiles/profile_keyed_service_factory.h"
  8. namespace extensions {
  9. class BluetoothAPI;
  10. class BluetoothAPIFactory : public ProfileKeyedServiceFactory {
  11. public:
  12. static BluetoothAPI* GetForProfile(Profile* profile);
  13. static BluetoothAPIFactory* GetInstance();
  14. private:
  15. friend struct DefaultSingletonTraits<BluetoothAPIFactory>;
  16. BluetoothAPIFactory();
  17. virtual ~BluetoothAPIFactory();
  18. // ProfileKeyedServiceFactory implementation.
  19. virtual ProfileKeyedService* BuildServiceInstanceFor(
  20. content::BrowserContext* profile) const OVERRIDE;
  21. virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
  22. virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
  23. virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
  24. };
  25. } // namespace extensions
  26. #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_FACTORY_H_