Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2211)

Unified Diff: chrome/browser/media/router/extension_mrpm_host_factory.h

Issue 1020743003: [Media Router] Design MediaRouter interface with stub implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move MRPMH::Delegate inheritence from MR to MRImpl Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698