| 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 24 matching lines...) Expand all Loading... |
| 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 OnCreateRouteResponseReceived(const MediaSink::Id& sink_id, | 38 void OnCreateRouteResponseReceived(const MediaSink::Id& sink_id, |
| 39 const MediaRoute* route); | 39 const MediaRoute* route); |
| 40 | 40 |
| 41 // 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 |
| 42 // there are no more issues. | 42 // there are no more issues. |
| 43 void UpdateIssue(const Issue* issue); | 43 void UpdateIssue(const Issue* issue); |
| 44 | 44 |
| 45 // Notifies the dialog that the route creation attempt timed out. |
| 46 void NotifyRouteCreationTimeout(); |
| 47 |
| 45 private: | 48 private: |
| 46 // WebUIMessageHandler implementation. | 49 // WebUIMessageHandler implementation. |
| 47 void RegisterMessages() override; | 50 void RegisterMessages() override; |
| 48 | 51 |
| 49 // Handlers for JavaScript messages. | 52 // Handlers for JavaScript messages. |
| 50 // In all cases, |args| consists of a single DictionaryValue containing the | 53 // In all cases, |args| consists of a single DictionaryValue containing the |
| 51 // actual parameters. | 54 // actual parameters. |
| 52 // See media_router_ui_interface.js for documentation on parameters. | 55 // See media_router_ui_interface.js for documentation on parameters. |
| 53 void OnRequestInitialData(const base::ListValue* args); | 56 void OnRequestInitialData(const base::ListValue* args); |
| 54 void OnCreateRoute(const base::ListValue* args); | 57 void OnCreateRoute(const base::ListValue* args); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 66 bool dialog_closing_; | 69 bool dialog_closing_; |
| 67 | 70 |
| 68 MediaRouterUI* media_router_ui_; | 71 MediaRouterUI* media_router_ui_; |
| 69 | 72 |
| 70 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); | 73 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 } // namespace media_router | 76 } // namespace media_router |
| 74 | 77 |
| 75 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ |
| OLD | NEW |