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

Side by Side Diff: chrome/browser/media/router/offscreen_presentation_manager_factory.cc

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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
5 #include "chrome/browser/media/router/offscreen_presentation_manager_factory.h"
6
7 #include "base/lazy_instance.h"
8 #include "chrome/browser/media/router/offscreen_presentation_manager.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 namespace media_router {
12
13 namespace {
14
15 base::LazyInstance<OffscreenPresentationManagerFactory> service_factory =
16 LAZY_INSTANCE_INITIALIZER;
17
18 } // namespace
19
20 // static
21 OffscreenPresentationManager*
22 OffscreenPresentationManagerFactory::GetOrCreateForBrowserContext(
23 content::BrowserContext* context) {
24 DCHECK(context);
25 return static_cast<OffscreenPresentationManager*>(
26 service_factory.Get().GetServiceForBrowserContext(context, true));
27 }
28
29 OffscreenPresentationManagerFactory::OffscreenPresentationManagerFactory()
30 : BrowserContextKeyedServiceFactory(
31 "OffscreenPresentationManager",
32 BrowserContextDependencyManager::GetInstance()) {
33 // TODO(imcheng): Any dependencies?
34 }
35 OffscreenPresentationManagerFactory::~OffscreenPresentationManagerFactory() {}
36
37 KeyedService* OffscreenPresentationManagerFactory::BuildServiceInstanceFor(
38 content::BrowserContext* context) const {
39 return new OffscreenPresentationManager;
40 }
41
42 content::BrowserContext*
43 OffscreenPresentationManagerFactory::GetBrowserContextToUse(
44 content::BrowserContext* context) const {
45 return context;
46 }
47
48 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698