| OLD | NEW |
| 1 // Copyright (c) 2009 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 // A helper class for animating the display of native widget content. | 5 // A helper class for animating the display of native widget content. |
| 6 // Currently only handle vertical sliding, but could be extended to handle | 6 // Currently only handle vertical sliding, but could be extended to handle |
| 7 // horizontal slides or other types of animations. | 7 // horizontal slides or other types of animations. |
| 8 // | 8 // |
| 9 // NOTE: This does not handle clipping. If you are not careful, you will | 9 // NOTE: This does not handle clipping. If you are not careful, you will |
| 10 // wind up with visibly overlapping widgets. If you need clipping, you can | 10 // wind up with visibly overlapping widgets. If you need clipping, you can |
| 11 // extend the constructor to take an option to give |fixed| its own GdkWindow | 11 // extend the constructor to take an option to give |fixed| its own GdkWindow |
| 12 // (via gtk_fixed_set_has_window). | 12 // (via gtk_fixed_set_has_window). |
| 13 | 13 |
| 14 #ifndef CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ | 14 #ifndef CHROME_BROWSER_UI_GTK_SLIDE_ANIMATOR_GTK_H_ |
| 15 #define CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ | 15 #define CHROME_BROWSER_UI_GTK_SLIDE_ANIMATOR_GTK_H_ |
| 16 #pragma once | 16 #pragma once |
| 17 | 17 |
| 18 #include <gtk/gtk.h> | 18 #include <gtk/gtk.h> |
| 19 | 19 |
| 20 #include "base/scoped_ptr.h" | 20 #include "base/scoped_ptr.h" |
| 21 #include "chrome/browser/gtk/owned_widget_gtk.h" | 21 #include "chrome/browser/gtk/owned_widget_gtk.h" |
| 22 #include "ui/base/animation/animation_delegate.h" | 22 #include "ui/base/animation/animation_delegate.h" |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 class SlideAnimation; | 25 class SlideAnimation; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // We need to move the child widget to (0, -height), but we don't know its | 114 // We need to move the child widget to (0, -height), but we don't know its |
| 115 // height until it has been allocated. This variable will be true until the | 115 // height until it has been allocated. This variable will be true until the |
| 116 // child widget has been allocated, at which point we will move it, and then | 116 // child widget has been allocated, at which point we will move it, and then |
| 117 // set this variable to false to indicate it should not be moved again. | 117 // set this variable to false to indicate it should not be moved again. |
| 118 bool child_needs_move_; | 118 bool child_needs_move_; |
| 119 | 119 |
| 120 static bool animations_enabled_; | 120 static bool animations_enabled_; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 #endif // CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ | 123 #endif // CHROME_BROWSER_UI_GTK_SLIDE_ANIMATOR_GTK_H_ |
| OLD | NEW |