| 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_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool CreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); | 106 bool CreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); |
| 107 | 107 |
| 108 // Calls MediaRouter to join the given route. | 108 // Calls MediaRouter to join the given route. |
| 109 bool ConnectRoute(const MediaSink::Id& sink_id, | 109 bool ConnectRoute(const MediaSink::Id& sink_id, |
| 110 const MediaRoute::Id& route_id); | 110 const MediaRoute::Id& route_id); |
| 111 | 111 |
| 112 // Calls MediaRouter to close the given route. | 112 // Calls MediaRouter to close the given route. |
| 113 void CloseRoute(const MediaRoute::Id& route_id); | 113 void CloseRoute(const MediaRoute::Id& route_id); |
| 114 | 114 |
| 115 // Calls MediaRouter to add the given issue. | 115 // Calls MediaRouter to add the given issue. |
| 116 void AddIssue(const Issue& issue); | 116 void AddIssue(const IssueInfo& issue); |
| 117 | 117 |
| 118 // Calls MediaRouter to clear the given issue. | 118 // Calls MediaRouter to clear the given issue. |
| 119 void ClearIssue(const Issue::Id& issue_id); | 119 void ClearIssue(const Issue::Id& issue_id); |
| 120 | 120 |
| 121 // Calls MediaRouter to search route providers for sinks matching | 121 // Calls MediaRouter to search route providers for sinks matching |
| 122 // |search_criteria| with the source that is currently associated with | 122 // |search_criteria| with the source that is currently associated with |
| 123 // |cast_mode|. The user's domain |domain| is also used. | 123 // |cast_mode|. The user's domain |domain| is also used. |
| 124 void SearchSinksAndCreateRoute(const MediaSink::Id& sink_id, | 124 void SearchSinksAndCreateRoute(const MediaSink::Id& sink_id, |
| 125 const std::string& search_criteria, | 125 const std::string& search_criteria, |
| 126 const std::string& domain, | 126 const std::string& domain, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 static std::string GetExtensionName(const GURL& url, | 213 static std::string GetExtensionName(const GURL& url, |
| 214 extensions::ExtensionRegistry* registry); | 214 extensions::ExtensionRegistry* registry); |
| 215 | 215 |
| 216 // QueryResultManager::Observer | 216 // QueryResultManager::Observer |
| 217 void OnResultsUpdated( | 217 void OnResultsUpdated( |
| 218 const std::vector<MediaSinkWithCastModes>& sinks) override; | 218 const std::vector<MediaSinkWithCastModes>& sinks) override; |
| 219 | 219 |
| 220 // Called by |issues_observer_| when the top issue has changed. | 220 // Called by |issues_observer_| when the top issue has changed. |
| 221 // If the UI is already initialized, notifies |handler_| to update the UI. | 221 // If the UI is already initialized, notifies |handler_| to update the UI. |
| 222 // Ignored if the UI is not yet initialized. | 222 // Ignored if the UI is not yet initialized. |
| 223 void SetIssue(const Issue* issue); | 223 void SetIssue(const Issue& issue); |
| 224 void ClearIssue(); |
| 224 | 225 |
| 225 // Called by |routes_observer_| when the set of active routes has changed. | 226 // Called by |routes_observer_| when the set of active routes has changed. |
| 226 void OnRoutesUpdated(const std::vector<MediaRoute>& routes, | 227 void OnRoutesUpdated(const std::vector<MediaRoute>& routes, |
| 227 const std::vector<MediaRoute::Id>& joinable_route_ids); | 228 const std::vector<MediaRoute::Id>& joinable_route_ids); |
| 228 | 229 |
| 229 // Callback passed to MediaRouter to receive response to route creation | 230 // Callback passed to MediaRouter to receive response to route creation |
| 230 // requests. | 231 // requests. |
| 231 void OnRouteResponseReceived( | 232 void OnRouteResponseReceived( |
| 232 int route_request_id, | 233 int route_request_id, |
| 233 const MediaSink::Id& sink_id, | 234 const MediaSink::Id& sink_id, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // NOTE: Weak pointers must be invalidated before all other member variables. | 349 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 349 // Therefore |weak_factory_| must be placed at the end. | 350 // Therefore |weak_factory_| must be placed at the end. |
| 350 base::WeakPtrFactory<MediaRouterUI> weak_factory_; | 351 base::WeakPtrFactory<MediaRouterUI> weak_factory_; |
| 351 | 352 |
| 352 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); | 353 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); |
| 353 }; | 354 }; |
| 354 | 355 |
| 355 } // namespace media_router | 356 } // namespace media_router |
| 356 | 357 |
| 357 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 358 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| OLD | NEW |