| 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_DOWNLOAD_ITEM_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ | 6 #define CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "app/animation.h" | 10 #include "app/animation.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Ask the icon manager to asynchronously start loading the icon for the file. | 62 // Ask the icon manager to asynchronously start loading the icon for the file. |
| 63 void LoadIcon(); | 63 void LoadIcon(); |
| 64 | 64 |
| 65 static void InitNineBoxes(); | 65 static void InitNineBoxes(); |
| 66 | 66 |
| 67 // Used for the download item's body and menu button. | 67 // Used for the download item's body and menu button. |
| 68 static gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e, | 68 static gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e, |
| 69 DownloadItemGtk* download_item); | 69 DownloadItemGtk* download_item); |
| 70 | 70 |
| 71 // Called when |body_| is clicked. |
| 72 static void OnClick(GtkWidget* widget, DownloadItemGtk* item); |
| 73 |
| 71 // Used for the download icon. | 74 // Used for the download icon. |
| 72 static gboolean OnProgressAreaExpose(GtkWidget* widget, | 75 static gboolean OnProgressAreaExpose(GtkWidget* widget, |
| 73 GdkEventExpose* e, | 76 GdkEventExpose* e, |
| 74 DownloadItemGtk* download_item); | 77 DownloadItemGtk* download_item); |
| 75 | 78 |
| 76 static gboolean OnMenuButtonPressEvent(GtkWidget* button, | 79 static gboolean OnMenuButtonPressEvent(GtkWidget* button, |
| 77 GdkEvent* event, | 80 GdkEvent* event, |
| 78 DownloadItemGtk* item); | 81 DownloadItemGtk* item); |
| 79 | 82 |
| 80 static void OnShelfResized(GtkWidget *widget, | 83 static void OnShelfResized(GtkWidget *widget, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 scoped_ptr<SlideAnimation> complete_animation_; | 167 scoped_ptr<SlideAnimation> complete_animation_; |
| 165 | 168 |
| 166 // The file icon for the download. May be null. | 169 // The file icon for the download. May be null. |
| 167 SkBitmap* icon_; | 170 SkBitmap* icon_; |
| 168 | 171 |
| 169 // For canceling an in progress icon request. | 172 // For canceling an in progress icon request. |
| 170 CancelableRequestConsumerT<int, 0> icon_consumer_; | 173 CancelableRequestConsumerT<int, 0> icon_consumer_; |
| 171 }; | 174 }; |
| 172 | 175 |
| 173 #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ | 176 #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ |
| OLD | NEW |