| Index: components/infobars/core/infobar.h
|
| diff --git a/components/infobars/core/infobar.h b/components/infobars/core/infobar.h
|
| index 6124d880c784c45ce94abb5922d5108b9f52314a..77e6ff1610b04bcdfb38ead6a231d06ea68c6c8a 100644
|
| --- a/components/infobars/core/infobar.h
|
| +++ b/components/infobars/core/infobar.h
|
| @@ -40,19 +40,30 @@ 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;
|
| + // Those globals must be initialized by the embedder before doing calling
|
| + // any of the method of the component via Initialize() call.
|
| + static int gDefaultBarTargetHeight;
|
| + static int gSeparatorLineHeight;
|
| + static int gDefaultArrowTargetHeight;
|
| + static int gMaximumArrowTargetHeight;
|
| // 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;
|
| + static int gDefaultArrowTargetHalfWidth;
|
| + static int gMaximumArrowTargetHalfWidth;
|
|
|
| explicit InfoBar(scoped_ptr<InfoBarDelegate> delegate);
|
| ~InfoBar() override;
|
|
|
| + // Initializes the globals by the infobar component. Must be called by the
|
| + // embedder to provides its own value before making any call into the
|
| + // component.
|
| + static void Initialize(int defaultBarTargetHeight,
|
| + int separatorLineHeight,
|
| + int defaultArrowTargetHeight,
|
| + int maximumArrowTargetHeight,
|
| + int defaultArrowTargetHalfWidth,
|
| + int maximumArrowTargetHalfWidth);
|
| +
|
| static SkColor GetTopColor(InfoBarDelegate::Type infobar_type);
|
| static SkColor GetBottomColor(InfoBarDelegate::Type infobar_type);
|
|
|
|
|