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