| 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_WEBUI_MESSAGE_HANDLER_
H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_
H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_
H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_
H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class MediaRouterUI; | 31 class MediaRouterUI; |
| 32 | 32 |
| 33 // The handler for Javascript messages related to the media router dialog. | 33 // The handler for Javascript messages related to the media router dialog. |
| 34 class MediaRouterWebUIMessageHandler : public content::WebUIMessageHandler { | 34 class MediaRouterWebUIMessageHandler : public content::WebUIMessageHandler { |
| 35 public: | 35 public: |
| 36 explicit MediaRouterWebUIMessageHandler(MediaRouterUI* media_router_ui); | 36 explicit MediaRouterWebUIMessageHandler(MediaRouterUI* media_router_ui); |
| 37 ~MediaRouterWebUIMessageHandler() override; | 37 ~MediaRouterWebUIMessageHandler() override; |
| 38 | 38 |
| 39 // Methods to update the status displayed by the dialog. | 39 // Methods to update the status displayed by the dialog. |
| 40 void UpdateSinks(const std::vector<MediaSinkWithCastModes>& sinks); | 40 void UpdateSinks(const std::vector<MediaSinkWithCastModes>& sinks); |
| 41 void UpdateRoutes(const std::vector<MediaRoute>& routes, | 41 virtual void UpdateRoutes( |
| 42 const std::vector<MediaRoute::Id>& joinable_route_ids, | 42 const std::vector<MediaRoute>& routes, |
| 43 const std::unordered_map<MediaRoute::Id, MediaCastMode>& | 43 const std::vector<MediaRoute::Id>& joinable_route_ids, |
| 44 current_cast_modes); | 44 const std::unordered_map<MediaRoute::Id, MediaCastMode>& |
| 45 current_cast_modes); |
| 45 void UpdateCastModes(const CastModeSet& cast_modes, | 46 void UpdateCastModes(const CastModeSet& cast_modes, |
| 46 const std::string& source_host); | 47 const std::string& source_host); |
| 47 void OnCreateRouteResponseReceived(const MediaSink::Id& sink_id, | 48 void OnCreateRouteResponseReceived(const MediaSink::Id& sink_id, |
| 48 const MediaRoute* route); | 49 const MediaRoute* route); |
| 49 void ReturnSearchResult(const std::string& sink_id); | 50 void ReturnSearchResult(const std::string& sink_id); |
| 50 | 51 |
| 51 // Does not take ownership of |issue|. Note that |issue| can be nullptr, when | 52 // Does not take ownership of |issue|. Note that |issue| can be nullptr, when |
| 52 // there are no more issues. | 53 // there are no more issues. |
| 53 void UpdateIssue(const Issue* issue); | 54 void UpdateIssue(const Issue* issue); |
| 54 | 55 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 bool dialog_closing_; | 126 bool dialog_closing_; |
| 126 | 127 |
| 127 MediaRouterUI* media_router_ui_; | 128 MediaRouterUI* media_router_ui_; |
| 128 | 129 |
| 129 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); | 130 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); |
| 130 }; | 131 }; |
| 131 | 132 |
| 132 } // namespace media_router | 133 } // namespace media_router |
| 133 | 134 |
| 134 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ | 135 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ |
| OLD | NEW |