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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "chrome/browser/ui/toolbar/media_router_action_controller.h" | 10 #include "chrome/browser/ui/toolbar/media_router_action_controller.h" |
11 #include "components/keyed_service/core/keyed_service.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace media_router { | 15 namespace media_router { |
16 | 16 |
17 // Service that owns per-profile Media Router UI objects, such as the controller | 17 // Service that owns per-profile Media Router UI objects, such as the controller |
18 // for the Media Router toolbar action. | 18 // for the Media Router toolbar action. |
19 class MediaRouterUIService : public KeyedService { | 19 class MediaRouterUIService : public KeyedService { |
20 public: | 20 public: |
21 explicit MediaRouterUIService(Profile* profile); | 21 explicit MediaRouterUIService(Profile* profile); |
22 ~MediaRouterUIService() override; | 22 ~MediaRouterUIService() override; |
23 | 23 |
| 24 // KeyedService: |
| 25 void Shutdown() override; |
| 26 |
24 static MediaRouterUIService* Get(Profile* profile); | 27 static MediaRouterUIService* Get(Profile* profile); |
25 | 28 |
26 virtual MediaRouterActionController* action_controller(); | 29 virtual MediaRouterActionController* action_controller(); |
27 | 30 |
28 private: | 31 private: |
29 friend class MediaRouterUIBrowserTest; | 32 friend class MediaRouterUIBrowserTest; |
30 | 33 |
31 MediaRouterActionController action_controller_; | 34 std::unique_ptr<MediaRouterActionController> action_controller_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(MediaRouterUIService); | 36 DISALLOW_COPY_AND_ASSIGN(MediaRouterUIService); |
34 }; | 37 }; |
35 | 38 |
36 } // namespace media_router | 39 } // namespace media_router |
37 | 40 |
38 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ | 41 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_UI_SERVICE_H_ |
OLD | NEW |