| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 const MediaRoute::Id& route_id, | 27 const MediaRoute::Id& route_id, |
| 28 const content::PresentationConnectionStateChangedCallback& callback) | 28 const content::PresentationConnectionStateChangedCallback& callback) |
| 29 override; | 29 override; |
| 30 | 30 |
| 31 // Called when the incognito profile for this instance is being shut down. | 31 // Called when the incognito profile for this instance is being shut down. |
| 32 // This will terminate all incognito media routes. | 32 // This will terminate all incognito media routes. |
| 33 void OnIncognitoProfileShutdown() override; | 33 void OnIncognitoProfileShutdown() override; |
| 34 | 34 |
| 35 std::vector<MediaRoute> GetCurrentRoutes() const override; | 35 std::vector<MediaRoute> GetCurrentRoutes() const override; |
| 36 | 36 |
| 37 scoped_refptr<MediaRouteController> GetRouteController( |
| 38 const MediaRoute::Id& route_id) override; |
| 39 |
| 37 protected: | 40 protected: |
| 38 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, | 41 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, |
| 39 PresentationConnectionStateChangedCallback); | 42 PresentationConnectionStateChangedCallback); |
| 40 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, | 43 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, |
| 41 PresentationConnectionStateChangedCallbackRemoved); | 44 PresentationConnectionStateChangedCallbackRemoved); |
| 42 FRIEND_TEST_ALL_PREFIXES(MediaRouterBaseTest, CreatePresentationIds); | 45 FRIEND_TEST_ALL_PREFIXES(MediaRouterBaseTest, CreatePresentationIds); |
| 43 FRIEND_TEST_ALL_PREFIXES(MediaRouterBaseTest, NotifyCallbacks); | 46 FRIEND_TEST_ALL_PREFIXES(MediaRouterBaseTest, NotifyCallbacks); |
| 44 | 47 |
| 45 MediaRouterBase(); | 48 MediaRouterBase(); |
| 46 | 49 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void Initialize(); | 81 void Initialize(); |
| 79 | 82 |
| 80 // Called when a PresentationConnectionStateChangedCallback associated with | 83 // Called when a PresentationConnectionStateChangedCallback associated with |
| 81 // |route_id| is removed from |presentation_connection_state_callbacks_|. | 84 // |route_id| is removed from |presentation_connection_state_callbacks_|. |
| 82 void OnPresentationConnectionStateCallbackRemoved( | 85 void OnPresentationConnectionStateCallbackRemoved( |
| 83 const MediaRoute::Id& route_id); | 86 const MediaRoute::Id& route_id); |
| 84 | 87 |
| 85 // KeyedService | 88 // KeyedService |
| 86 void Shutdown() override; | 89 void Shutdown() override; |
| 87 | 90 |
| 91 // MediaRouter |
| 92 void DetachRouteController(const MediaRoute::Id& route_id, |
| 93 MediaRouteController* controller) override; |
| 94 |
| 88 std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_; | 95 std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_; |
| 89 bool initialized_; | 96 bool initialized_; |
| 90 | 97 |
| 91 DISALLOW_COPY_AND_ASSIGN(MediaRouterBase); | 98 DISALLOW_COPY_AND_ASSIGN(MediaRouterBase); |
| 92 }; | 99 }; |
| 93 | 100 |
| 94 } // namespace media_router | 101 } // namespace media_router |
| 95 | 102 |
| 96 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ | 103 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ |
| OLD | NEW |