Chromium Code Reviews| Index: chrome/browser/media/router/extension_mrpm_host_factory.h |
| diff --git a/chrome/browser/media/router/extension_mrpm_host_factory.h b/chrome/browser/media/router/extension_mrpm_host_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..59da169d4d438295f0d2f681be5c4c8c617c350e |
| --- /dev/null |
| +++ b/chrome/browser/media/router/extension_mrpm_host_factory.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_ROUTER_EXTENSION_MRPM_HOST_FACTORY_H_ |
| +#define CHROME_BROWSER_MEDIA_ROUTER_EXTENSION_MRPM_HOST_FACTORY_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +} // namespace content |
| + |
| +namespace media_router { |
| + |
| +class ExtensionMediaRouteProviderManagerHost; |
| + |
| +// A factory that lazily creates and/or returns a |
| +// ExtensionMediaRouteProviderManagerHost object on a per BrowserContext basis. |
|
Kevin M
2015/03/26 20:50:14
for a given BrowserContext?
imcheng
2015/03/26 23:33:12
Done.
|
| +class ExtensionMRPMHostFactory : public BrowserContextKeyedServiceFactory { |
| + public: |
| + static ExtensionMediaRouteProviderManagerHost* GetMRPMHostForBrowserContext( |
| + content::BrowserContext* context); |
| + static ExtensionMRPMHostFactory* GetInstance(); |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<ExtensionMRPMHostFactory>; |
| + |
| + ExtensionMRPMHostFactory(); |
| + ~ExtensionMRPMHostFactory() override; |
| + |
| + // BrowserContextKeyedBaseFactory |
| + KeyedService* BuildServiceInstanceFor( |
| + content::BrowserContext* context) const override; |
| + content::BrowserContext* GetBrowserContextToUse( |
| + content::BrowserContext* context) const override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionMRPMHostFactory); |
| +}; |
| + |
| +} // namespace media_router |
| + |
| +#endif // CHROME_BROWSER_MEDIA_ROUTER_EXTENSION_MRPM_HOST_FACTORY_H_ |