Chromium Code Reviews| Index: components/infobars/core/infobar_delegate.h |
| diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h |
| index 7508de872cb569ebab1153ac967846559b5e3cfe..d8ef0d8632ac94b5c13b8a2460fa097c90a10d24 100644 |
| --- a/components/infobars/core/infobar_delegate.h |
| +++ b/components/infobars/core/infobar_delegate.h |
| @@ -5,10 +5,13 @@ |
| #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
| #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
| +#include <vector> |
| + |
| #include "base/macros.h" |
| #include "base/strings/string16.h" |
| #include "build/build_config.h" |
| #include "ui/base/window_open_disposition.h" |
| +#include "url/gurl.h" |
| class ConfirmInfoBarDelegate; |
| class HungRendererInfoBarDelegate; |
| @@ -73,6 +76,34 @@ class InfoBarDelegate { |
| bool is_redirect; |
| }; |
| + // Detailed information that should be shown in the content of the infobar. |
| + struct Detail { |
| + Detail(); |
| + ~Detail(); |
| + |
| + int icon_id; |
| + base::string16 label; |
| + base::string16 sub_label; |
| + }; |
| + |
| + // Descriptive text that should be shown in the content of the infobar. |
| + struct Description { |
|
Justin Donnelly
2015/12/30 18:06:37
If we keep this, how about FooterText as a, um, mo
please use gerrit instead
2016/01/07 01:39:25
Not keeping this.
|
| + Description(); |
| + ~Description(); |
| + |
| + struct Link { |
| + Link(); |
| + ~Link(); |
| + |
| + size_t start; |
| + size_t end; |
| + GURL url; |
| + }; |
| + |
| + base::string16 text; |
| + std::vector<Link> links; |
| + }; |
| + |
| // Value to use when the InfoBar has no icon to show. |
| static const int kNoIconID; |
| @@ -103,6 +134,16 @@ class InfoBarDelegate { |
| // resource bundle as its icon. |
| virtual gfx::Image GetIcon() const; |
| + // Returns the detailed information to be shown for this InfoBar. If the |
| + // vector is empty, the details will not be shown. Not all platforms use this |
| + // information. |
| + virtual const std::vector<Detail>& GetDetails() const; |
| + |
| + // Returns the descriptive text to be shown for this InfoBar. If the vector is |
| + // empty, the description will not be shown. Not all platforms use this |
| + // information. |
| + virtual const std::vector<Description>& GetDescriptions() const; |
| + |
| // Returns true if the supplied |delegate| is equal to this one. Equality is |
| // left to the implementation to define. This function is called by the |
| // InfoBarManager when determining whether or not a delegate should be |
| @@ -155,6 +196,9 @@ class InfoBarDelegate { |
| // The ID of the active navigation entry at the time we became owned. |
| int nav_entry_id_; |
| + std::vector<Detail> empty_details_; |
| + std::vector<Description> empty_descriptions_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
| }; |