Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2438)

Unified Diff: chrome/browser/gtk/download_item_gtk.h

Issue 113920: Dangerous download dialog for linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: mac uses DownloadManager? Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_util.h ('k') | chrome/browser/gtk/download_item_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chrome/browser/download/download_util.h ('k') | chrome/browser/gtk/download_item_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698