| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Handlers for JavaScript messages. | 52 // Handlers for JavaScript messages. |
| 53 // In all cases, |args| consists of a single DictionaryValue containing the | 53 // In all cases, |args| consists of a single DictionaryValue containing the |
| 54 // actual parameters. | 54 // actual parameters. |
| 55 // See media_router_ui_interface.js for documentation on parameters. | 55 // See media_router_ui_interface.js for documentation on parameters. |
| 56 void OnRequestInitialData(const base::ListValue* args); | 56 void OnRequestInitialData(const base::ListValue* args); |
| 57 void OnCreateRoute(const base::ListValue* args); | 57 void OnCreateRoute(const base::ListValue* args); |
| 58 void OnActOnIssue(const base::ListValue* args); | 58 void OnActOnIssue(const base::ListValue* args); |
| 59 void OnCloseRoute(const base::ListValue* args); | 59 void OnCloseRoute(const base::ListValue* args); |
| 60 void OnCloseDialog(const base::ListValue* args); | 60 void OnCloseDialog(const base::ListValue* args); |
| 61 void OnReportClickedSinkIndex(const base::ListValue* args); |
| 62 void OnReportSelectedCastMode(const base::ListValue* args); |
| 61 void OnReportSinkCount(const base::ListValue* args); | 63 void OnReportSinkCount(const base::ListValue* args); |
| 62 void OnInitialDataReceived(const base::ListValue* args); | 64 void OnInitialDataReceived(const base::ListValue* args); |
| 63 | 65 |
| 64 // Performs an action for an Issue of |type|. | 66 // Performs an action for an Issue of |type|. |
| 65 // |args| contains additional parameter that varies based on |type|. | 67 // |args| contains additional parameter that varies based on |type|. |
| 66 // Returns |true| if the action was successfully performed. | 68 // Returns |true| if the action was successfully performed. |
| 67 bool ActOnIssueType(const IssueAction::Type& type, | 69 bool ActOnIssueType(const IssueAction::Type& type, |
| 68 const base::DictionaryValue* args); | 70 const base::DictionaryValue* args); |
| 69 | 71 |
| 70 // Keeps track of whether a command to close the dialog has been issued. | 72 // Keeps track of whether a command to close the dialog has been issued. |
| 71 bool dialog_closing_; | 73 bool dialog_closing_; |
| 72 | 74 |
| 73 MediaRouterUI* media_router_ui_; | 75 MediaRouterUI* media_router_ui_; |
| 74 | 76 |
| 75 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); | 77 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace media_router | 80 } // namespace media_router |
| 79 | 81 |
| 80 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ | 82 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ |
| OLD | NEW |