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

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

Issue 1911183002: [Media Router] Implement an internal Media Routes observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad merge & android build Created 4 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/router/media_router_factory.h" 5 #include "chrome/browser/media/router/media_router_factory.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/profiles/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 MediaRouterFactory::~MediaRouterFactory() { 62 MediaRouterFactory::~MediaRouterFactory() {
63 } 63 }
64 64
65 content::BrowserContext* MediaRouterFactory::GetBrowserContextToUse( 65 content::BrowserContext* MediaRouterFactory::GetBrowserContextToUse(
66 content::BrowserContext* context) const { 66 content::BrowserContext* context) const {
67 return chrome::GetBrowserContextRedirectedInIncognito(context); 67 return chrome::GetBrowserContextRedirectedInIncognito(context);
68 } 68 }
69 69
70 KeyedService* MediaRouterFactory::BuildServiceInstanceFor( 70 KeyedService* MediaRouterFactory::BuildServiceInstanceFor(
71 BrowserContext* context) const { 71 BrowserContext* context) const {
72 MediaRouterBase* media_router = nullptr;
72 #if defined(OS_ANDROID) 73 #if defined(OS_ANDROID)
73 return new MediaRouterAndroid(context); 74 media_router = new MediaRouterAndroid(context);
74 #else 75 #else
75 return new MediaRouterMojoImpl(extensions::ProcessManager::Get(context)); 76 media_router =
77 new MediaRouterMojoImpl(extensions::ProcessManager::Get(context));
76 #endif 78 #endif
79 media_router->Initialize();
80 return media_router;
77 } 81 }
78 82
79 } // namespace media_router 83 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_base.cc ('k') | chrome/browser/media/router/mojo/media_router.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698