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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.h

Issue 6788014: Fix DCHECK() in infobar animation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months 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
Index: chrome/browser/ui/views/infobars/infobar_view.h
===================================================================
--- chrome/browser/ui/views/infobars/infobar_view.h (revision 80169)
+++ chrome/browser/ui/views/infobars/infobar_view.h (working copy)
@@ -35,7 +35,7 @@
SkPath* fill_path() const { return fill_path_.get(); }
SkPath* stroke_path() const { return stroke_path_.get(); }
- int AnimatedTabHeight() const;
+ int tab_height() const { return tab_height_; }
protected:
// The target height of the InfoBar, regardless of what its current height
@@ -80,7 +80,8 @@
// button from overlapping views that cannot be shrunk any further.
virtual int ContentMinimumWidth() const;
- void set_target_height(int height) { target_height_ = height; }
+ // Changes the target height of the main ("bar") portion of the infobar.
+ void SetTargetHeight(int height);
// These return x coordinates delimiting the usable area for subclasses to lay
// out their controls.
@@ -102,11 +103,11 @@
// InfoBar:
virtual void PlatformSpecificHide(bool animate) OVERRIDE;
+ virtual void PlatformSpecificRecalculateHeight() OVERRIDE;
// views::View:
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
// views::FocusChangeListener:
@@ -117,8 +118,6 @@
// |prefsize| within the standard InfoBar height. Stable during an animation.
int CenterY(const gfx::Size prefsize) const;
- int AnimatedBarHeight() const;
-
// Destroys the external focus tracker, if present. If |restore_focus| is
// true, restores focus to the view tracked by the focus tracker before doing
// so.
@@ -144,6 +143,12 @@
// The target height for the bar portion of the InfoBarView.
int target_height_;
+ // The current heights of the tab and bar portions.
+ int tab_height_;
+ int bar_height_;
+
+ // The paths for the InfoBarBackground to draw, sized according to the heights
+ // above.
scoped_ptr<SkPath> fill_path_;
scoped_ptr<SkPath> stroke_path_;
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698