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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_view.h

Issue 6675033: Fix DCHECK in infobar animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added InvalidateLayout calls to animation and target_height changes. Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "ui/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Returns the minimum width the content (that is, everything between the icon 116 // Returns the minimum width the content (that is, everything between the icon
117 // and the close button) can be shrunk to. This is used to prevent the close 117 // and the close button) can be shrunk to. This is used to prevent the close
118 // button from overlapping views that cannot be shrunk any further. 118 // button from overlapping views that cannot be shrunk any further.
119 virtual int ContentMinimumWidth() const; 119 virtual int ContentMinimumWidth() const;
120 120
121 // Removes our associated InfoBarDelegate from the associated TabContents. 121 // Removes our associated InfoBarDelegate from the associated TabContents.
122 // (Will lead to this InfoBar being closed). 122 // (Will lead to this InfoBar being closed).
123 void RemoveInfoBar() const; 123 void RemoveInfoBar() const;
124 124
125 void set_target_height(int height) { target_height_ = height; } 125 void SetTargetHeight(int height);
126 126
127 ui::SlideAnimation* animation() { return animation_.get(); } 127 ui::SlideAnimation* animation() { return animation_.get(); }
128 128
129 // These return x coordinates delimiting the usable area for subclasses to lay 129 // These return x coordinates delimiting the usable area for subclasses to lay
130 // out their controls. 130 // out their controls.
131 int StartX() const; 131 int StartX() const;
132 int EndX() const; 132 int EndX() const;
133 133
134 // Returns a centered y-position of a control of height specified in 134 // Returns a centered y-position of a control of height specified in
135 // |prefsize| within the standard InfoBar height, adjusted according to the 135 // |prefsize| within the standard InfoBar height, adjusted according to the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Tracks and stores the last focused view which is not the InfoBar or any of 196 // Tracks and stores the last focused view which is not the InfoBar or any of
197 // its children. Used to restore focus once the InfoBar is closed. 197 // its children. Used to restore focus once the InfoBar is closed.
198 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; 198 scoped_ptr<views::ExternalFocusTracker> focus_tracker_;
199 199
200 // Used to delete this object after a return to the message loop. 200 // Used to delete this object after a return to the message loop.
201 ScopedRunnableMethodFactory<InfoBarView> delete_factory_; 201 ScopedRunnableMethodFactory<InfoBarView> delete_factory_;
202 202
203 // The target height for the bar portion of the InfoBarView. 203 // The target height for the bar portion of the InfoBarView.
204 int target_height_; 204 int target_height_;
205 205
206 // The current height for the tab portion of the InfoBarView.
207 int tab_height_;
208
209 // The current height for the bar portion of the InfoBarView.
210 int bar_height_;
211
206 scoped_ptr<SkPath> fill_path_; 212 scoped_ptr<SkPath> fill_path_;
207 scoped_ptr<SkPath> stroke_path_; 213 scoped_ptr<SkPath> stroke_path_;
208 214
209 DISALLOW_COPY_AND_ASSIGN(InfoBarView); 215 DISALLOW_COPY_AND_ASSIGN(InfoBarView);
210 }; 216 };
211 217
212 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 218 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.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