| 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 f5b111730951225a1c484bbe324921baf2720f9e..b2a7303f95278cae0a387304ddd111feb34de1a2 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -303,6 +303,9 @@ 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(new gfx::SlideAnimation(this));
|
| + 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::UpdateLocationBarState(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) {
|
| @@ -1294,6 +1311,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() {
|
|
|