| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 // Callback passed to MediaRouter to receive response to route creation | 210 // Callback passed to MediaRouter to receive response to route creation |
| 211 // requests. | 211 // requests. |
| 212 void OnRouteResponseReceived( | 212 void OnRouteResponseReceived( |
| 213 int route_request_id, | 213 int route_request_id, |
| 214 const MediaSink::Id& sink_id, | 214 const MediaSink::Id& sink_id, |
| 215 MediaCastMode cast_mode, | 215 MediaCastMode cast_mode, |
| 216 const base::string16& presentation_request_source_name, | 216 const base::string16& presentation_request_source_name, |
| 217 const RouteRequestResult& result); | 217 const RouteRequestResult& result); |
| 218 | 218 |
| 219 // Closes the dialog after receiving a route response when using |
| 220 // |create_session_request_|. This prevents the dialog from trying to use the |
| 221 // same presentation request again. |
| 222 void HandleCreateSessionRequestRouteResponse(const RouteRequestResult&); |
| 223 |
| 219 // Callback passed to MediaRouter to receive the sink ID of the sink found by | 224 // Callback passed to MediaRouter to receive the sink ID of the sink found by |
| 220 // SearchSinksAndCreateRoute(). | 225 // SearchSinksAndCreateRoute(). |
| 221 void OnSearchSinkResponseReceived(MediaCastMode cast_mode, | 226 void OnSearchSinkResponseReceived(MediaCastMode cast_mode, |
| 222 const MediaSink::Id& found_sink_id); | 227 const MediaSink::Id& found_sink_id); |
| 223 | 228 |
| 224 // Creates and sends an issue if route creation timed out. | 229 // Creates and sends an issue if route creation timed out. |
| 225 void SendIssueForRouteTimeout( | 230 void SendIssueForRouteTimeout( |
| 226 MediaCastMode cast_mode, | 231 MediaCastMode cast_mode, |
| 227 const base::string16& presentation_request_source_name); | 232 const base::string16& presentation_request_source_name); |
| 228 | 233 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // NOTE: Weak pointers must be invalidated before all other member variables. | 320 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 316 // Therefore |weak_factory_| must be placed at the end. | 321 // Therefore |weak_factory_| must be placed at the end. |
| 317 base::WeakPtrFactory<MediaRouterUI> weak_factory_; | 322 base::WeakPtrFactory<MediaRouterUI> weak_factory_; |
| 318 | 323 |
| 319 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); | 324 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); |
| 320 }; | 325 }; |
| 321 | 326 |
| 322 } // namespace media_router | 327 } // namespace media_router |
| 323 | 328 |
| 324 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 329 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| OLD | NEW |