| 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 #ifndef CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // transparent. | 79 // transparent. |
| 80 void SetContainerColorMap(); | 80 void SetContainerColorMap(); |
| 81 | 81 |
| 82 // Sets full transparency for the container window. This is used if | 82 // Sets full transparency for the container window. This is used if |
| 83 // compositing is available for the screen. | 83 // compositing is available for the screen. |
| 84 void SetContainerTransparency(); | 84 void SetContainerTransparency(); |
| 85 | 85 |
| 86 // Sets the shape mask for the container window to emulate a transparent | 86 // Sets the shape mask for the container window to emulate a transparent |
| 87 // container window. This is used if compositing is not available for the | 87 // container window. This is used if compositing is not available for the |
| 88 // screen. | 88 // screen. |
| 89 void SetContainerShapeMask(const SkBitmap& dragged_contents); | 89 // |pixbuf| is the pixbuf for the tab only (not the render view). |
| 90 void SetContainerShapeMask(GdkPixbuf* pixbuf); |
| 90 | 91 |
| 91 // Paints the tab when it's attached to a tabstrip. | 92 // Paints the tab. The returned pixbuf belongs to the caller. |
| 92 SkBitmap PaintAttachedTab(); | 93 GdkPixbuf* PaintTab(); |
| 93 | |
| 94 // Paints the tab when it's not attached to any tabstrip. | |
| 95 SkBitmap PaintDetachedView(); | |
| 96 | |
| 97 // Paints a screenshot of the dragged contents from the backing store into | |
| 98 // |canvas|. | |
| 99 void PaintScreenshotIntoCanvas(gfx::Canvas* canvas, | |
| 100 const gfx::Rect& target_bounds); | |
| 101 | 94 |
| 102 // expose-event handler that notifies when the tab needs to be redrawn. | 95 // expose-event handler that notifies when the tab needs to be redrawn. |
| 103 static gboolean OnExposeEvent(GtkWidget* widget, GdkEventExpose* event, | 96 static gboolean OnExposeEvent(GtkWidget* widget, GdkEventExpose* event, |
| 104 DraggedTabGtk* dragged_tab); | 97 DraggedTabGtk* dragged_tab); |
| 105 | 98 |
| 106 // The window that contains the dragged tab or tab contents. | 99 // The window that contains the dragged tab or tab contents. |
| 107 GtkWidget* container_; | 100 GtkWidget* container_; |
| 108 | 101 |
| 109 // The native view of the tab contents. | 102 // The native view of the tab contents. |
| 110 GtkWidget* contents_; | 103 GtkWidget* contents_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 140 scoped_ptr<Callback0::Type> animation_callback_; | 133 scoped_ptr<Callback0::Type> animation_callback_; |
| 141 | 134 |
| 142 // The start and end bounds of the animation sequence. | 135 // The start and end bounds of the animation sequence. |
| 143 gfx::Rect animation_start_bounds_; | 136 gfx::Rect animation_start_bounds_; |
| 144 gfx::Rect animation_end_bounds_; | 137 gfx::Rect animation_end_bounds_; |
| 145 | 138 |
| 146 DISALLOW_COPY_AND_ASSIGN(DraggedTabGtk); | 139 DISALLOW_COPY_AND_ASSIGN(DraggedTabGtk); |
| 147 }; | 140 }; |
| 148 | 141 |
| 149 #endif // CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ | 142 #endif // CHROME_BROWSER_GTK_TABS_DRAGGED_TAB_GTK_H_ |
| OLD | NEW |