| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static std::string CreatePresentationId(); | 45 static std::string CreatePresentationId(); |
| 46 | 46 |
| 47 void NotifyPresentationConnectionStateChange( | 47 void NotifyPresentationConnectionStateChange( |
| 48 const MediaRoute::Id& route_id, | 48 const MediaRoute::Id& route_id, |
| 49 content::PresentationConnectionState state); | 49 content::PresentationConnectionState state); |
| 50 void NotifyPresentationConnectionClose( | 50 void NotifyPresentationConnectionClose( |
| 51 const MediaRoute::Id& route_id, | 51 const MediaRoute::Id& route_id, |
| 52 content::PresentationConnectionCloseReason reason, | 52 content::PresentationConnectionCloseReason reason, |
| 53 const std::string& message); | 53 const std::string& message); |
| 54 | 54 |
| 55 // Returns true when there is at least one MediaRoute with is_local = true. | 55 // Returns true when there is at least one MediaRoute that can be returned by |
| 56 bool HasLocalRoute() const; | 56 // JoinRoute(). |
| 57 bool HasJoinableRoute() const; |
| 57 | 58 |
| 58 using PresentationConnectionStateChangedCallbacks = base::CallbackList<void( | 59 using PresentationConnectionStateChangedCallbacks = base::CallbackList<void( |
| 59 const content::PresentationConnectionStateChangeInfo&)>; | 60 const content::PresentationConnectionStateChangeInfo&)>; |
| 60 | 61 |
| 61 base::ScopedPtrHashMap< | 62 base::ScopedPtrHashMap< |
| 62 MediaRoute::Id, | 63 MediaRoute::Id, |
| 63 std::unique_ptr<PresentationConnectionStateChangedCallbacks>> | 64 std::unique_ptr<PresentationConnectionStateChangedCallbacks>> |
| 64 presentation_connection_state_callbacks_; | 65 presentation_connection_state_callbacks_; |
| 65 | 66 |
| 66 base::ThreadChecker thread_checker_; | 67 base::ThreadChecker thread_checker_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 84 | 85 |
| 85 std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_; | 86 std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_; |
| 86 bool initialized_; | 87 bool initialized_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(MediaRouterBase); | 89 DISALLOW_COPY_AND_ASSIGN(MediaRouterBase); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace media_router | 92 } // namespace media_router |
| 92 | 93 |
| 93 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ | 94 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_ |
| OLD | NEW |