OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/slide_animator_gtk.h" |
6 | 6 |
7 #include "app/animation.h" | 7 #include "app/animation.h" |
8 #include "app/slide_animation.h" | 8 #include "app/slide_animation.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 if (duration != 0) | 59 if (duration != 0) |
60 animation_->SetSlideDuration(duration); | 60 animation_->SetSlideDuration(duration); |
61 } | 61 } |
62 | 62 |
63 SlideAnimatorGtk::~SlideAnimatorGtk() { | 63 SlideAnimatorGtk::~SlideAnimatorGtk() { |
64 widget_.Destroy(); | 64 widget_.Destroy(); |
65 } | 65 } |
66 | 66 |
67 void SlideAnimatorGtk::Open() { | 67 void SlideAnimatorGtk::Open() { |
68 is_closing_ = false; | 68 is_closing_ = false; |
69 gtk_widget_show_all(widget_.get()); | 69 gtk_widget_show(widget_.get()); |
70 animation_->Show(); | 70 animation_->Show(); |
71 } | 71 } |
72 | 72 |
73 void SlideAnimatorGtk::OpenWithoutAnimation() { | 73 void SlideAnimatorGtk::OpenWithoutAnimation() { |
74 animation_->Reset(1.0); | 74 animation_->Reset(1.0); |
75 Open(); | 75 Open(); |
76 | 76 |
77 // This checks to see if |child_| has been allocated yet. If it has been | 77 // This checks to see if |child_| has been allocated yet. If it has been |
78 // allocated already, we can go ahead and reposition everything by calling | 78 // allocated already, we can go ahead and reposition everything by calling |
79 // AnimationProgressed(). If it has not been allocated, we have to delay | 79 // AnimationProgressed(). If it has not been allocated, we have to delay |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (slider->child_needs_move_) { | 130 if (slider->child_needs_move_) { |
131 gtk_fixed_move(GTK_FIXED(slider->widget()), child, 0, -allocation->height); | 131 gtk_fixed_move(GTK_FIXED(slider->widget()), child, 0, -allocation->height); |
132 slider->child_needs_move_ = false; | 132 slider->child_needs_move_ = false; |
133 } | 133 } |
134 | 134 |
135 if (slider->fixed_needs_resize_) { | 135 if (slider->fixed_needs_resize_) { |
136 slider->AnimationProgressed(slider->animation_.get()); | 136 slider->AnimationProgressed(slider->animation_.get()); |
137 slider->fixed_needs_resize_ = false; | 137 slider->fixed_needs_resize_ = false; |
138 } | 138 } |
139 } | 139 } |
OLD | NEW |