| 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 OnReportSinkCount(const base::ListValue* args); |
| 61 | 62 |
| 62 // Performs an action for an Issue of |type|. | 63 // Performs an action for an Issue of |type|. |
| 63 // |args| contains additional parameter that varies based on |type|. | 64 // |args| contains additional parameter that varies based on |type|. |
| 64 // Returns |true| if the action was successfully performed. | 65 // Returns |true| if the action was successfully performed. |
| 65 bool ActOnIssueType(const IssueAction::Type& type, | 66 bool ActOnIssueType(const IssueAction::Type& type, |
| 66 const base::DictionaryValue* args); | 67 const base::DictionaryValue* args); |
| 67 | 68 |
| 68 // Keeps track of whether a command to close the dialog has been issued. | 69 // Keeps track of whether a command to close the dialog has been issued. |
| 69 bool dialog_closing_; | 70 bool dialog_closing_; |
| 70 | 71 |
| 71 MediaRouterUI* media_router_ui_; | 72 MediaRouterUI* media_router_ui_; |
| 72 | 73 |
| 73 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); | 74 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace media_router | 77 } // namespace media_router |
| 77 | 78 |
| 78 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ | 79 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDL
ER_H_ |
| OLD | NEW |