OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tabs/dragged_tab_gtk.h" | 5 #include "chrome/browser/gtk/tabs/dragged_tab_gtk.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 gint x, y, width, height; | 119 gint x, y, width, height; |
120 gdk_window_get_origin(container_->window, &x, &y); | 120 gdk_window_get_origin(container_->window, &x, &y); |
121 gdk_window_get_geometry(container_->window, NULL, NULL, | 121 gdk_window_get_geometry(container_->window, NULL, NULL, |
122 &width, &height, NULL); | 122 &width, &height, NULL); |
123 | 123 |
124 animation_start_bounds_ = gfx::Rect(x, y, width, height); | 124 animation_start_bounds_ = gfx::Rect(x, y, width, height); |
125 animation_end_bounds_ = bounds; | 125 animation_end_bounds_ = bounds; |
126 | 126 |
127 close_animation_.SetSlideDuration(kAnimateToBoundsDurationMs); | 127 close_animation_.SetSlideDuration(kAnimateToBoundsDurationMs); |
128 close_animation_.SetTweenType(SlideAnimation::EASE_OUT); | 128 close_animation_.SetTweenType(Tween::EASE_OUT); |
129 if (!close_animation_.IsShowing()) { | 129 if (!close_animation_.IsShowing()) { |
130 close_animation_.Reset(); | 130 close_animation_.Reset(); |
131 close_animation_.Show(); | 131 close_animation_.Show(); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 //////////////////////////////////////////////////////////////////////////////// | 135 //////////////////////////////////////////////////////////////////////////////// |
136 // DraggedTabGtk, AnimationDelegate implementation: | 136 // DraggedTabGtk, AnimationDelegate implementation: |
137 | 137 |
138 void DraggedTabGtk::AnimationProgressed(const Animation* animation) { | 138 void DraggedTabGtk::AnimationProgressed(const Animation* animation) { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 cairo_set_source_surface(cr, surface, 0, 0); | 327 cairo_set_source_surface(cr, surface, 0, 0); |
328 cairo_paint(cr); | 328 cairo_paint(cr); |
329 | 329 |
330 cairo_destroy(cr); | 330 cairo_destroy(cr); |
331 | 331 |
332 cairo_surface_destroy(surface); | 332 cairo_surface_destroy(surface); |
333 | 333 |
334 // We've already drawn the tab, so don't propagate the expose-event signal. | 334 // We've already drawn the tab, so don't propagate the expose-event signal. |
335 return TRUE; | 335 return TRUE; |
336 } | 336 } |
OLD | NEW |