| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| index 8c0cc94409b52a35d711baebc9192fead2f6bac9..311120c05df1e407436b1894c6cfa26ebf4a0a47 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -141,6 +141,7 @@ LocationBarView::LocationBarView(Browser* browser,
|
| manage_passwords_icon_view_(NULL),
|
| translate_icon_view_(NULL),
|
| star_view_(NULL),
|
| + size_animation_(this),
|
| is_popup_mode_(is_popup_mode),
|
| show_focus_rect_(false),
|
| template_url_service_(NULL),
|
| @@ -303,6 +304,8 @@ void LocationBarView::Init() {
|
| // Initialize the location entry. We do this to avoid a black flash which is
|
| // visible when the location entry has just been initialized.
|
| Update(NULL);
|
| +
|
| + size_animation_.Reset(1);
|
| }
|
|
|
| bool LocationBarView::IsInitialized() const {
|
| @@ -526,6 +529,8 @@ gfx::Size LocationBarView::GetPreferredSize() const {
|
| if (!IsInitialized())
|
| return min_size;
|
|
|
| + min_size.set_height(min_size.height() * size_animation_.GetCurrentValue());
|
| +
|
| // Compute width of omnibox-leading content.
|
| const int horizontal_edge_thickness = GetHorizontalEdgeThickness();
|
| int leading_width = horizontal_edge_thickness;
|
| @@ -1064,6 +1069,18 @@ void LocationBarView::UpdateBookmarkStarVisibility() {
|
| }
|
| }
|
|
|
| +void LocationBarView::UpdateLocationBarVisibility(bool visible, bool animate) {
|
| + if (!animate) {
|
| + size_animation_.Reset(visible ? 1 : 0);
|
| + return;
|
| + }
|
| +
|
| + if (visible)
|
| + size_animation_.Show();
|
| + else
|
| + size_animation_.Hide();
|
| +}
|
| +
|
| bool LocationBarView::ShowPageActionPopup(
|
| const extensions::Extension* extension,
|
| bool grant_tab_permissions) {
|
| @@ -1297,6 +1314,16 @@ bool LocationBarView::CanStartDragForView(View* sender,
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| +// LocationBarView, private gfx::AnimationDelegate implementation:
|
| +void LocationBarView::AnimationProgressed(const gfx::Animation* animation) {
|
| + browser_->window()->ToolbarSizeChanged(true);
|
| +}
|
| +
|
| +void LocationBarView::AnimationEnded(const gfx::Animation* animation) {
|
| + browser_->window()->ToolbarSizeChanged(false);
|
| +}
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| // LocationBarView, private OmniboxEditController implementation:
|
|
|
| void LocationBarView::OnChanged() {
|
|
|