OLD | NEW |
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.h" | 5 #include "chrome/browser/media/router/media_router_ui_service.h" |
6 | 6 |
7 #include "chrome/browser/media/router/media_router_feature.h" | 7 #include "chrome/browser/media/router/media_router_feature.h" |
8 #include "chrome/browser/media/router/media_router_ui_service_factory.h" | 8 #include "chrome/browser/media/router/media_router_ui_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 | 10 |
11 namespace media_router { | 11 namespace media_router { |
12 | 12 |
13 MediaRouterUIService::MediaRouterUIService(Profile* profile) | 13 MediaRouterUIService::MediaRouterUIService(Profile* profile) |
14 : action_controller_(profile) {} | 14 : action_controller_(new MediaRouterActionController(profile)) {} |
15 | 15 |
16 MediaRouterUIService::~MediaRouterUIService() {} | 16 MediaRouterUIService::~MediaRouterUIService() {} |
17 | 17 |
| 18 void MediaRouterUIService::Shutdown() { |
| 19 action_controller_.reset(); |
| 20 } |
| 21 |
18 // static | 22 // static |
19 MediaRouterUIService* MediaRouterUIService::Get(Profile* profile) { | 23 MediaRouterUIService* MediaRouterUIService::Get(Profile* profile) { |
20 return MediaRouterUIServiceFactory::GetForBrowserContext(profile); | 24 return MediaRouterUIServiceFactory::GetForBrowserContext(profile); |
21 } | 25 } |
22 | 26 |
23 MediaRouterActionController* MediaRouterUIService::action_controller() { | 27 MediaRouterActionController* MediaRouterUIService::action_controller() { |
24 return &action_controller_; | 28 return action_controller_.get(); |
25 } | 29 } |
26 | 30 |
27 } // namespace media_router | 31 } // namespace media_router |
OLD | NEW |