| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // If the UI is already initialized, notifies |handler_| to update the UI. | 136 // If the UI is already initialized, notifies |handler_| to update the UI. |
| 137 // Ignored if the UI is not yet initialized. | 137 // Ignored if the UI is not yet initialized. |
| 138 void SetIssue(const Issue* issue); | 138 void SetIssue(const Issue* issue); |
| 139 | 139 |
| 140 // Called by |routes_observer_| when the set of active routes has changed. | 140 // Called by |routes_observer_| when the set of active routes has changed. |
| 141 void OnRoutesUpdated(const std::vector<MediaRoute>& routes); | 141 void OnRoutesUpdated(const std::vector<MediaRoute>& routes); |
| 142 | 142 |
| 143 // Callback passed to MediaRouter to receive response to route creation | 143 // Callback passed to MediaRouter to receive response to route creation |
| 144 // requests. | 144 // requests. |
| 145 void OnRouteResponseReceived(const MediaRoute* route, | 145 void OnRouteResponseReceived(const MediaRoute* route, |
| 146 const std::string& presentation_id, |
| 146 const std::string& error); | 147 const std::string& error); |
| 147 | 148 |
| 148 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); | 149 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); |
| 149 | 150 |
| 150 // Sets the source host name to be displayed in the UI. | 151 // Sets the source host name to be displayed in the UI. |
| 151 // Gets cast modes from |query_result_manager_| and forwards it to UI. | 152 // Gets cast modes from |query_result_manager_| and forwards it to UI. |
| 152 // One of the Init* functions must have been called before. | 153 // One of the Init* functions must have been called before. |
| 153 void UpdateSourceHostAndCastModes(const GURL& frame_url); | 154 void UpdateSourceHostAndCastModes(const GURL& frame_url); |
| 154 | 155 |
| 155 // Initializes the dialog with mirroring sources derived from |initiator|, | 156 // Initializes the dialog with mirroring sources derived from |initiator|, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // NOTE: Weak pointers must be invalidated before all other member variables. | 208 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 208 // Therefore |weak_factory_| must be placed at the end. | 209 // Therefore |weak_factory_| must be placed at the end. |
| 209 base::WeakPtrFactory<MediaRouterUI> weak_factory_; | 210 base::WeakPtrFactory<MediaRouterUI> weak_factory_; |
| 210 | 211 |
| 211 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); | 212 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); |
| 212 }; | 213 }; |
| 213 | 214 |
| 214 } // namespace media_router | 215 } // namespace media_router |
| 215 | 216 |
| 216 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 217 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
| OLD | NEW |