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& presentation_id, | 150 const std::string& presentation_id, |
150 const std::string& error); | 151 const std::string& error); |
151 | 152 |
152 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); | 153 bool DoCreateRoute(const MediaSink::Id& sink_id, MediaCastMode cast_mode); |
153 | 154 |
154 // Sets the source host name to be displayed in the UI. | 155 // Sets the source host name to be displayed in the UI. |
155 // Gets cast modes from |query_result_manager_| and forwards it to UI. | 156 // Gets cast modes from |query_result_manager_| and forwards it to UI. |
156 // One of the Init* functions must have been called before. | 157 // One of the Init* functions must have been called before. |
157 void UpdateSourceHostAndCastModes(const GURL& frame_url); | 158 void UpdateSourceHostAndCastModes(const GURL& frame_url); |
158 | 159 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // NOTE: Weak pointers must be invalidated before all other member variables. | 212 // NOTE: Weak pointers must be invalidated before all other member variables. |
212 // Therefore |weak_factory_| must be placed at the end. | 213 // Therefore |weak_factory_| must be placed at the end. |
213 base::WeakPtrFactory<MediaRouterUI> weak_factory_; | 214 base::WeakPtrFactory<MediaRouterUI> weak_factory_; |
214 | 215 |
215 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); | 216 DISALLOW_COPY_AND_ASSIGN(MediaRouterUI); |
216 }; | 217 }; |
217 | 218 |
218 } // namespace media_router | 219 } // namespace media_router |
219 | 220 |
220 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ | 221 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_UI_H_ |
OLD | NEW |