Index: chrome/browser/gtk/download_item_gtk.h |
=================================================================== |
--- chrome/browser/gtk/download_item_gtk.h (revision 17020) |
+++ chrome/browser/gtk/download_item_gtk.h (working copy) |
@@ -44,6 +44,11 @@ |
private: |
friend class DownloadShelfContextMenuGtk; |
+ DownloadItem* get_download(); |
+ |
+ // Returns true IFF the download is dangerous and unconfirmed. |
+ bool IsDangerous(); |
+ |
// Functions for controlling the progress animation. |
// Repaint the download progress. |
void UpdateDownloadProgress(); |
@@ -76,6 +81,14 @@ |
GtkAllocation *allocation, |
DownloadItemGtk* item); |
+ // Dangerous download related. ----------------------------------------------- |
+ static gboolean OnDangerousPromptExpose(GtkWidget* widget, |
+ GdkEventExpose* event, |
+ DownloadItemGtk* item); |
+ |
+ static void OnDangerousAccept(GtkWidget* button, DownloadItemGtk* item); |
+ static void OnDangerousDecline(GtkWidget* button, DownloadItemGtk* item); |
+ |
// Nineboxes for the body area. |
static NineBox* body_nine_box_normal_; |
static NineBox* body_nine_box_prelight_; |
@@ -86,6 +99,9 @@ |
static NineBox* menu_nine_box_prelight_; |
static NineBox* menu_nine_box_active_; |
+ // Ninebox for the background of the dangerous download prompt. |
+ static NineBox* dangerous_nine_box_; |
+ |
// The shelf on which we are displayed. |
DownloadShelfGtk* parent_shelf_; |
@@ -127,6 +143,13 @@ |
// We do not want to overlap it. |
GtkWidget* bounding_widget_; |
+ // The dangerous download dialog. This will be null for safe downloads. |
+ GtkWidget* dangerous_prompt_; |
+ |
+ // An hbox for holding components of the dangerous download dialog. |
+ GtkWidget* dangerous_hbox_; |
+ int dangerous_hbox_full_width_; |
+ |
// The ID of the handler for the parent shelf's "size-allocate" event. We save |
// it so we can disconnect when we are destroyed. |
gulong resize_handler_id_; |