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 17 matching lines...) Expand all Loading... |
28 class MediaRouterWebUIMessageHandler : public content::WebUIMessageHandler { | 28 class MediaRouterWebUIMessageHandler : public content::WebUIMessageHandler { |
29 public: | 29 public: |
30 MediaRouterWebUIMessageHandler(); | 30 MediaRouterWebUIMessageHandler(); |
31 ~MediaRouterWebUIMessageHandler() override; | 31 ~MediaRouterWebUIMessageHandler() override; |
32 | 32 |
33 // Methods to update the status displayed by the dialog. | 33 // Methods to update the status displayed by the dialog. |
34 void UpdateSinks(const std::vector<MediaSinkWithCastModes>& sinks); | 34 void UpdateSinks(const std::vector<MediaSinkWithCastModes>& sinks); |
35 void UpdateRoutes(const std::vector<MediaRoute>& routes); | 35 void UpdateRoutes(const std::vector<MediaRoute>& routes); |
36 void UpdateCastModes(const CastModeSet& cast_modes, | 36 void UpdateCastModes(const CastModeSet& cast_modes, |
37 const std::string& source_host); | 37 const std::string& source_host); |
38 void AddRoute(const MediaRoute& route); | 38 void OnCreateRouteResponseReceived(const MediaSink::Id& sink_id, |
| 39 const MediaRoute* route); |
39 | 40 |
40 // Does not take ownership of |issue|. Note that |issue| can be nullptr, when | 41 // Does not take ownership of |issue|. Note that |issue| can be nullptr, when |
41 // there are no more issues. | 42 // there are no more issues. |
42 void UpdateIssue(const Issue* issue); | 43 void UpdateIssue(const Issue* issue); |
43 | 44 |
44 private: | 45 private: |
45 // WebUIMessageHandler implementation. | 46 // WebUIMessageHandler implementation. |
46 void RegisterMessages() override; | 47 void RegisterMessages() override; |
47 | 48 |
48 // Handlers for JavaScript messages. | 49 // Handlers for JavaScript messages. |
(...skipping 17 matching lines...) Expand all Loading... |
66 | 67 |
67 // Keeps track of whether a command to close the dialog has been issued. | 68 // Keeps track of whether a command to close the dialog has been issued. |
68 bool dialog_closing_; | 69 bool dialog_closing_; |
69 | 70 |
70 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); | 71 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); |
71 }; | 72 }; |
72 | 73 |
73 } // namespace media_router | 74 } // namespace media_router |
74 | 75 |
75 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ | 76 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ |
OLD | NEW |