| 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 "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 | 11 |
| 12 class BaseDownloadItemModel; | 12 class BaseDownloadItemModel; |
| 13 class NineBox; | 13 class NineBox; |
| 14 | 14 |
| 15 class DownloadItemGtk { | 15 class DownloadItemGtk { |
| 16 public: | 16 public: |
| 17 // DownloadItemGtk takes ownership of |download_item_model|; | 17 // DownloadItemGtk takes ownership of |download_item_model|. |
| 18 DownloadItemGtk(BaseDownloadItemModel* download_item_model, | 18 DownloadItemGtk(BaseDownloadItemModel* download_item_model, |
| 19 GtkWidget* parent_shelf); | 19 GtkWidget* parent_shelf); |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 static void InitNineBoxes(); | 22 static void InitNineBoxes(); |
| 23 | 23 |
| 24 static gboolean OnBodyExpose(GtkWidget* widget, GdkEventExpose* e, | 24 static gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e, |
| 25 DownloadItemGtk* download_item); | 25 DownloadItemGtk* download_item); |
| 26 | 26 |
| 27 static NineBox* nine_box_normal_; | 27 // Nineboxes for the body area. |
| 28 static NineBox* nine_box_prelight_; | 28 static NineBox* body_nine_box_normal_; |
| 29 static NineBox* nine_box_active_; | 29 static NineBox* body_nine_box_prelight_; |
| 30 static NineBox* body_nine_box_active_; |
| 31 |
| 32 // Nineboxes for the menu button. |
| 33 static NineBox* menu_nine_box_normal_; |
| 34 static NineBox* menu_nine_box_prelight_; |
| 35 static NineBox* menu_nine_box_active_; |
| 30 | 36 |
| 31 // The widget that contains the body and menu dropdown. | 37 // The widget that contains the body and menu dropdown. |
| 32 GtkWidget* hbox_; | 38 GtkWidget* hbox_; |
| 33 | 39 |
| 34 // The widget that contains the name of the download and the progress | 40 // The widget that contains the name of the download and the progress |
| 35 // animation. | 41 // animation. |
| 36 GtkWidget* body_; | 42 GtkWidget* body_; |
| 37 | 43 |
| 44 // The widget that creates a dropdown menu when pressed. |
| 45 GtkWidget* menu_button_; |
| 46 |
| 38 // The download item model we represent. | 47 // The download item model we represent. |
| 39 scoped_ptr<BaseDownloadItemModel> download_model_; | 48 scoped_ptr<BaseDownloadItemModel> download_model_; |
| 40 | 49 |
| 41 // The shelf we show ourselves on. We do not own this widget. | 50 // The shelf we show ourselves on. We do not own this widget. |
| 42 GtkWidget* parent_shelf_; | 51 GtkWidget* parent_shelf_; |
| 43 }; | 52 }; |
| 44 | 53 |
| 45 #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ | 54 #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_ |
| OLD | NEW |