| 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_MEDIA_ROUTER_ISSUE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Creates a custom issue. | 43 // Creates a custom issue. |
| 44 // |title|: The title for the issue. | 44 // |title|: The title for the issue. |
| 45 // |message|: The optional description message for the issue. | 45 // |message|: The optional description message for the issue. |
| 46 // |default_action|: Default action user can take to resolve the issue. | 46 // |default_action|: Default action user can take to resolve the issue. |
| 47 // |secondary_actions|: Array of options user can take to resolve the | 47 // |secondary_actions|: Array of options user can take to resolve the |
| 48 // issue. Can be empty. Currently only one secondary | 48 // issue. Can be empty. Currently only one secondary |
| 49 // action is supported. | 49 // action is supported. |
| 50 // |route_id|: The route id, or empty if global. | 50 // |route_id|: The route id, or empty if global. |
| 51 // |severity|: The severity of the issue. | 51 // |severity|: The severity of the issue. |
| 52 // |is_blocking|: True if the issue needs to be resolved before continuing. | 52 // |is_blocking|: True if the issue needs to be resolved before continuing. |
| 53 // |help_url|: Required if one of the actions is learn-more. | 53 // |help_page_id|: Required if one of the actions is learn-more. Passes in -1 |
| 54 // if the issue is not associated with a help page. |
| 54 Issue(const std::string& title, | 55 Issue(const std::string& title, |
| 55 const std::string& message, | 56 const std::string& message, |
| 56 const IssueAction& default_action, | 57 const IssueAction& default_action, |
| 57 const std::vector<IssueAction>& secondary_actions, | 58 const std::vector<IssueAction>& secondary_actions, |
| 58 const MediaRoute::Id& route_id, | 59 const MediaRoute::Id& route_id, |
| 59 const Severity severity, | 60 const Severity severity, |
| 60 bool is_blocking, | 61 bool is_blocking, |
| 61 const std::string& helpUrl); | 62 int help_page_id); |
| 62 | 63 |
| 63 Issue(const Issue& other); | 64 Issue(const Issue& other); |
| 64 | 65 |
| 65 ~Issue(); | 66 ~Issue(); |
| 66 | 67 |
| 67 // See constructor comments for more information about these fields. | 68 // See constructor comments for more information about these fields. |
| 68 const std::string& title() const { return title_; } | 69 const std::string& title() const { return title_; } |
| 69 const std::string& message() const { return message_; } | 70 const std::string& message() const { return message_; } |
| 70 IssueAction default_action() const { return default_action_; } | 71 IssueAction default_action() const { return default_action_; } |
| 71 const std::vector<IssueAction>& secondary_actions() const { | 72 const std::vector<IssueAction>& secondary_actions() const { |
| 72 return secondary_actions_; | 73 return secondary_actions_; |
| 73 } | 74 } |
| 74 MediaRoute::Id route_id() const { return route_id_; } | 75 MediaRoute::Id route_id() const { return route_id_; } |
| 75 Severity severity() const { return severity_; } | 76 Severity severity() const { return severity_; } |
| 76 const Issue::Id& id() const { return id_; } | 77 const Issue::Id& id() const { return id_; } |
| 77 bool is_blocking() const { return is_blocking_; } | 78 bool is_blocking() const { return is_blocking_; } |
| 78 bool is_global() const { return route_id_.empty(); } | 79 bool is_global() const { return route_id_.empty(); } |
| 79 const GURL& help_url() const { return help_url_; } | 80 int help_page_id() const { return help_page_id_; } |
| 80 | 81 |
| 81 bool Equals(const Issue& other) const; | 82 bool Equals(const Issue& other) const; |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 std::string title_; | 85 std::string title_; |
| 85 std::string message_; | 86 std::string message_; |
| 86 IssueAction default_action_; | 87 IssueAction default_action_; |
| 87 std::vector<IssueAction> secondary_actions_; | 88 std::vector<IssueAction> secondary_actions_; |
| 88 std::string route_id_; | 89 std::string route_id_; |
| 89 Severity severity_; | 90 Severity severity_; |
| 90 Issue::Id id_; | 91 Issue::Id id_; |
| 91 bool is_blocking_; | 92 bool is_blocking_; |
| 92 GURL help_url_; | 93 int help_page_id_; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace media_router | 96 } // namespace media_router |
| 96 | 97 |
| 97 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ | 98 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ |
| OLD | NEW |