OLD | NEW |
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 #include "chrome/browser/gtk/slide_animator_gtk.h" | 5 #include "chrome/browser/ui/gtk/slide_animator_gtk.h" |
6 | 6 |
7 #include "chrome/browser/gtk/gtk_expanded_container.h" | 7 #include "chrome/browser/ui/gtk/gtk_expanded_container.h" |
8 #include "ui/base/animation/animation.h" | 8 #include "ui/base/animation/animation.h" |
9 #include "ui/base/animation/slide_animation.h" | 9 #include "ui/base/animation/slide_animation.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 void OnChildSizeRequest(GtkWidget* expanded, | 13 void OnChildSizeRequest(GtkWidget* expanded, |
14 GtkWidget* child, | 14 GtkWidget* child, |
15 GtkRequisition* requisition, | 15 GtkRequisition* requisition, |
16 gpointer control_child_size) { | 16 gpointer control_child_size) { |
17 // If |control_child_size| is true, then we want |child_| to match the width | 17 // If |control_child_size| is true, then we want |child_| to match the width |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // static | 142 // static |
143 void SlideAnimatorGtk::OnChildSizeAllocate(GtkWidget* child, | 143 void SlideAnimatorGtk::OnChildSizeAllocate(GtkWidget* child, |
144 GtkAllocation* allocation, | 144 GtkAllocation* allocation, |
145 SlideAnimatorGtk* slider) { | 145 SlideAnimatorGtk* slider) { |
146 if (slider->child_needs_move_) { | 146 if (slider->child_needs_move_) { |
147 gtk_expanded_container_move(GTK_EXPANDED_CONTAINER(slider->widget()), | 147 gtk_expanded_container_move(GTK_EXPANDED_CONTAINER(slider->widget()), |
148 child, 0, -allocation->height); | 148 child, 0, -allocation->height); |
149 slider->child_needs_move_ = false; | 149 slider->child_needs_move_ = false; |
150 } | 150 } |
151 } | 151 } |
OLD | NEW |