| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| 7 | 7 |
| 8 #include "app/slide_animation.h" | 8 #include "app/slide_animation.h" |
| 9 #include "base/gfx/point.h" | 9 #include "base/gfx/point.h" |
| 10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // to determine where to place the Tab in the attached TabStrip. | 52 // to determine where to place the Tab in the attached TabStrip. |
| 53 gfx::Size attached_tab_size() const { return attached_tab_size_; } | 53 gfx::Size attached_tab_size() const { return attached_tab_size_; } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 // Overridden from AnimationDelegate: | 56 // Overridden from AnimationDelegate: |
| 57 virtual void AnimationProgressed(const Animation* animation); | 57 virtual void AnimationProgressed(const Animation* animation); |
| 58 virtual void AnimationEnded(const Animation* animation); | 58 virtual void AnimationEnded(const Animation* animation); |
| 59 virtual void AnimationCanceled(const Animation* animation); | 59 virtual void AnimationCanceled(const Animation* animation); |
| 60 | 60 |
| 61 // Overridden from views::View: | 61 // Overridden from views::View: |
| 62 virtual void Paint(ChromeCanvas* canvas); | 62 virtual void Paint(gfx::Canvas* canvas); |
| 63 virtual void Layout(); | 63 virtual void Layout(); |
| 64 virtual gfx::Size GetPreferredSize(); | 64 virtual gfx::Size GetPreferredSize(); |
| 65 | 65 |
| 66 // Paint the view, when it's attached to a TabStrip. | 66 // Paint the view, when it's attached to a TabStrip. |
| 67 void PaintAttachedTab(ChromeCanvas* canvas); | 67 void PaintAttachedTab(gfx::Canvas* canvas); |
| 68 | 68 |
| 69 // Paint the view, when it's not attached to any TabStrip. | 69 // Paint the view, when it's not attached to any TabStrip. |
| 70 void PaintDetachedView(ChromeCanvas* canvas); | 70 void PaintDetachedView(gfx::Canvas* canvas); |
| 71 | 71 |
| 72 // Paint the view, when "Show window contents while dragging" is disabled. | 72 // Paint the view, when "Show window contents while dragging" is disabled. |
| 73 void PaintFocusRect(ChromeCanvas* canvas); | 73 void PaintFocusRect(gfx::Canvas* canvas); |
| 74 | 74 |
| 75 // Resizes the container to fit the content for the current attachment mode. | 75 // Resizes the container to fit the content for the current attachment mode. |
| 76 void ResizeContainer(); | 76 void ResizeContainer(); |
| 77 | 77 |
| 78 // Utility for scaling a size by the current scaling factor. | 78 // Utility for scaling a size by the current scaling factor. |
| 79 int ScaleValue(int value); | 79 int ScaleValue(int value); |
| 80 | 80 |
| 81 // The window that contains the DraggedTabView. | 81 // The window that contains the DraggedTabView. |
| 82 scoped_ptr<views::WidgetWin> container_; | 82 scoped_ptr<views::WidgetWin> container_; |
| 83 | 83 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 scoped_ptr<Callback0::Type> animation_callback_; | 115 scoped_ptr<Callback0::Type> animation_callback_; |
| 116 | 116 |
| 117 // The start and end bounds of the animation sequence. | 117 // The start and end bounds of the animation sequence. |
| 118 gfx::Rect animation_start_bounds_; | 118 gfx::Rect animation_start_bounds_; |
| 119 gfx::Rect animation_end_bounds_; | 119 gfx::Rect animation_end_bounds_; |
| 120 | 120 |
| 121 DISALLOW_EVIL_CONSTRUCTORS(DraggedTabView); | 121 DISALLOW_EVIL_CONSTRUCTORS(DraggedTabView); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ | 124 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_ |
| OLD | NEW |