Chromium Code Reviews| 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. |
|
imcheng
2016/05/23 20:02:42
I would add something like: Pass in -1 if the issu
apacible
2016/05/23 20:22:52
Done.
| |
| 54 Issue(const std::string& title, | 54 Issue(const std::string& title, |
| 55 const std::string& message, | 55 const std::string& message, |
| 56 const IssueAction& default_action, | 56 const IssueAction& default_action, |
| 57 const std::vector<IssueAction>& secondary_actions, | 57 const std::vector<IssueAction>& secondary_actions, |
| 58 const MediaRoute::Id& route_id, | 58 const MediaRoute::Id& route_id, |
| 59 const Severity severity, | 59 const Severity severity, |
| 60 bool is_blocking, | 60 bool is_blocking, |
| 61 const std::string& helpUrl); | 61 int help_page_id); |
| 62 | 62 |
| 63 Issue(const Issue& other); | 63 Issue(const Issue& other); |
| 64 | 64 |
| 65 ~Issue(); | 65 ~Issue(); |
| 66 | 66 |
| 67 // See constructor comments for more information about these fields. | 67 // See constructor comments for more information about these fields. |
| 68 const std::string& title() const { return title_; } | 68 const std::string& title() const { return title_; } |
| 69 const std::string& message() const { return message_; } | 69 const std::string& message() const { return message_; } |
| 70 IssueAction default_action() const { return default_action_; } | 70 IssueAction default_action() const { return default_action_; } |
| 71 const std::vector<IssueAction>& secondary_actions() const { | 71 const std::vector<IssueAction>& secondary_actions() const { |
| 72 return secondary_actions_; | 72 return secondary_actions_; |
| 73 } | 73 } |
| 74 MediaRoute::Id route_id() const { return route_id_; } | 74 MediaRoute::Id route_id() const { return route_id_; } |
| 75 Severity severity() const { return severity_; } | 75 Severity severity() const { return severity_; } |
| 76 const Issue::Id& id() const { return id_; } | 76 const Issue::Id& id() const { return id_; } |
| 77 bool is_blocking() const { return is_blocking_; } | 77 bool is_blocking() const { return is_blocking_; } |
| 78 bool is_global() const { return route_id_.empty(); } | 78 bool is_global() const { return route_id_.empty(); } |
| 79 const GURL& help_url() const { return help_url_; } | 79 int help_page_id() const { return help_page_id_; } |
| 80 | 80 |
| 81 bool Equals(const Issue& other) const; | 81 bool Equals(const Issue& other) const; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 std::string title_; | 84 std::string title_; |
| 85 std::string message_; | 85 std::string message_; |
| 86 IssueAction default_action_; | 86 IssueAction default_action_; |
| 87 std::vector<IssueAction> secondary_actions_; | 87 std::vector<IssueAction> secondary_actions_; |
| 88 std::string route_id_; | 88 std::string route_id_; |
| 89 Severity severity_; | 89 Severity severity_; |
| 90 Issue::Id id_; | 90 Issue::Id id_; |
| 91 bool is_blocking_; | 91 bool is_blocking_; |
| 92 GURL help_url_; | 92 int help_page_id_; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace media_router | 95 } // namespace media_router |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ | 97 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUE_H_ |
| OLD | NEW |