Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: components/infobars/core/infobar.h

Issue 765643003: Remove dependency from infobars component to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/infobars.gypi ('k') | components/infobars/core/infobar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/infobar.h
diff --git a/components/infobars/core/infobar.h b/components/infobars/core/infobar.h
index 6124d880c784c45ce94abb5922d5108b9f52314a..feec5f6bb230f4c21c74155776e398168986cd48 100644
--- a/components/infobars/core/infobar.h
+++ b/components/infobars/core/infobar.h
@@ -19,6 +19,19 @@ namespace infobars {
class InfoBarContainer;
class InfoBarManager;
+// InfoBarConstants holds embedder specific constants used by InfoBar
+// animation implementation.
+struct InfoBarConstants {
+ int separator_line_height;
+ int default_bar_target_height;
+ int default_arrow_target_height;
+ int maximum_arrow_target_height;
+ // The half-width (see comments on |arrow_half_width_| below) scales to its
+ // default and maximum values proportionally to how the height scales to its.
+ int default_arrow_target_half_width;
+ int maximum_arrow_target_half_width;
+};
+
// InfoBar is a cross-platform base class for an infobar "view" (in the MVC
// sense), which owns a corresponding InfoBarDelegate "model". Typically,
// a caller will call XYZInfoBarDelegate::Create() and pass in the
@@ -40,17 +53,7 @@ class InfoBar : public gfx::AnimationDelegate {
typedef InfoBar AddedDetails;
typedef std::pair<InfoBar*, bool> RemovedDetails;
- // Platforms must define these.
- static const int kDefaultBarTargetHeight;
- static const int kSeparatorLineHeight;
- static const int kDefaultArrowTargetHeight;
- static const int kMaximumArrowTargetHeight;
- // The half-width (see comments on |arrow_half_width_| below) scales to its
- // default and maximum values proportionally to how the height scales to its.
- static const int kDefaultArrowTargetHalfWidth;
- static const int kMaximumArrowTargetHalfWidth;
-
- explicit InfoBar(scoped_ptr<InfoBarDelegate> delegate);
+ InfoBar(scoped_ptr<InfoBarDelegate> delegate);
~InfoBar() override;
static SkColor GetTopColor(InfoBarDelegate::Type infobar_type);
« no previous file with comments | « components/infobars.gypi ('k') | components/infobars/core/infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698