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

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

Issue 173456: Revert my download item change.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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/gtk/download_item_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/download_item_gtk.cc
===================================================================
--- chrome/browser/gtk/download_item_gtk.cc (revision 24420)
+++ chrome/browser/gtk/download_item_gtk.cc (working copy)
@@ -90,10 +90,6 @@
~DownloadShelfContextMenuGtk() {
}
- GtkWidget* widget() {
- return menu_->widget();
- }
-
void Popup(GtkWidget* widget, GdkEvent* event) {
// Create the menu if we have not created it yet or we created it for
// an in-progress download that has since completed.
@@ -117,7 +113,7 @@
}
virtual void ExecuteCommand(int id) {
- return ExecuteItemCommand(id);
+ ExecuteItemCommand(id);
}
virtual void StoppedShowing() {
@@ -196,8 +192,7 @@
dangerous_prompt_(NULL),
dangerous_label_(NULL),
icon_(NULL),
- creation_time_(base::Time::Now()),
- method_factory_(this) {
+ creation_time_(base::Time::Now()) {
LoadIcon();
body_.Own(gtk_button_new());
@@ -377,10 +372,7 @@
switch (download->state()) {
case DownloadItem::REMOVING:
- // Delete ourselves asychronously so that if we were deleted from the
- // context menu, its ref holders have a chance to let go.
- MessageLoop::current()->PostTask(FROM_HERE,
- method_factory_.NewRunnableMethod(&DownloadItemGtk::RemoveThis));
+ parent_shelf_->RemoveDownloadItem(this); // This will delete us!
return;
case DownloadItem::CANCELLED:
StopDownloadProgress();
@@ -419,10 +411,6 @@
UpdateStatusLabel(status_label_, status_text_);
}
-void DownloadItemGtk::RemoveThis() {
- parent_shelf_->RemoveDownloadItem(this);
-}
-
void DownloadItemGtk::AnimationProgressed(const Animation* animation) {
if (animation == complete_animation_.get()) {
gtk_widget_queue_draw(progress_area_.get());
« no previous file with comments | « chrome/browser/gtk/download_item_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698