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

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

Issue 2332693003: Show media router toolbar icon ephemerally for active local routes and issues (Closed)
Patch Set: Address Devlin's comments Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ui_service_factory.h" 5 #include "chrome/browser/media/router/media_router_ui_service_factory.h"
6 6
7 #include "chrome/browser/media/router/media_router_factory.h" 7 #include "chrome/browser/media/router/media_router_factory.h"
8 #include "chrome/browser/media/router/media_router_ui_service.h" 8 #include "chrome/browser/media/router/media_router_ui_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/toolbar/toolbar_actions_model_factory.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_model_factory.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 BrowserContext* MediaRouterUIServiceFactory::GetBrowserContextToUse( 42 BrowserContext* MediaRouterUIServiceFactory::GetBrowserContextToUse(
43 BrowserContext* context) const { 43 BrowserContext* context) const {
44 return context; 44 return context;
45 } 45 }
46 46
47 KeyedService* MediaRouterUIServiceFactory::BuildServiceInstanceFor( 47 KeyedService* MediaRouterUIServiceFactory::BuildServiceInstanceFor(
48 BrowserContext* context) const { 48 BrowserContext* context) const {
49 return new MediaRouterUIService(Profile::FromBrowserContext(context)); 49 return new MediaRouterUIService(Profile::FromBrowserContext(context));
50 } 50 }
51 51
52 bool MediaRouterUIServiceFactory::ServiceIsCreatedWithBrowserContext() const {
53 #if defined(ENABLE_MEDIA_ROUTER) && !defined(OS_ANDROID)
54 return true;
55 #else
56 return false;
57 #endif
58 }
59
60 bool MediaRouterUIServiceFactory::ServiceIsNULLWhileTesting() const {
61 return true;
62 }
63
52 } // namespace media_router 64 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698