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

Unified Diff: components/infobars/core/infobar_container.cc

Issue 752853005: Remove dependency from infobars component to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/core/infobar_android.cc ('k') | components/infobars/test/infobar_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/infobar_container.cc
diff --git a/components/infobars/core/infobar_container.cc b/components/infobars/core/infobar_container.cc
index b6831129e69a830c970b632e9baed4c66a298b86..c88fd566d2a9f630e5d737ff835ca6de3248567b 100644
--- a/components/infobars/core/infobar_container.cc
+++ b/components/infobars/core/infobar_container.cc
@@ -20,7 +20,7 @@ InfoBarContainer::Delegate::~Delegate() {
InfoBarContainer::InfoBarContainer(Delegate* delegate)
: delegate_(delegate),
infobar_manager_(NULL),
- top_arrow_target_height_(InfoBar::kDefaultArrowTargetHeight) {
+ top_arrow_target_height_(InfoBar::gDefaultArrowTargetHeight) {
}
InfoBarContainer::~InfoBarContainer() {
@@ -81,8 +81,8 @@ void InfoBarContainer::SetMaxTopArrowHeight(int height) {
// Decrease the height by the arrow stroke thickness, which is the separator
// line height, because the infobar arrow target heights are without-stroke.
top_arrow_target_height_ = std::min(
- std::max(height - InfoBar::kSeparatorLineHeight, 0),
- InfoBar::kMaximumArrowTargetHeight);
+ std::max(height - InfoBar::gSeparatorLineHeight, 0),
+ InfoBar::gMaximumArrowTargetHeight);
UpdateInfoBarArrowTargetHeights();
}
@@ -167,12 +167,12 @@ int InfoBarContainer::ArrowTargetHeightForInfoBar(size_t infobar_index) const {
const gfx::SlideAnimation& first_infobar_animation =
const_cast<const InfoBar*>(infobars_.front())->animation();
if ((infobar_index > 1) || first_infobar_animation.IsShowing())
- return InfoBar::kDefaultArrowTargetHeight;
+ return InfoBar::gDefaultArrowTargetHeight;
// When the first infobar is animating closed, we animate the second infobar's
// arrow target height from the default to the top target height. Note that
// the animation values here are going from 1.0 -> 0.0 as the top bar closes.
return top_arrow_target_height_ + static_cast<int>(
- (InfoBar::kDefaultArrowTargetHeight - top_arrow_target_height_) *
+ (InfoBar::gDefaultArrowTargetHeight - top_arrow_target_height_) *
first_infobar_animation.GetCurrentValue());
}
« no previous file with comments | « components/infobars/core/infobar_android.cc ('k') | components/infobars/test/infobar_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698