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

Side by Side Diff: chrome/browser/gtk/download_item_gtk.cc

Issue 523111: GTK: Refresh the visibliity of other download items when removing a download ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/gtk/download_item_gtk.h" 5 #include "chrome/browser/gtk/download_item_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/gfx/canvas_paint.h" 8 #include "app/gfx/canvas_paint.h"
9 #include "app/gfx/font.h" 9 #include "app/gfx/font.h"
10 #include "app/gfx/text_elider.h" 10 #include "app/gfx/text_elider.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 new_item_animation_->Show(); 334 new_item_animation_->Show();
335 } 335 }
336 336
337 DownloadItemGtk::~DownloadItemGtk() { 337 DownloadItemGtk::~DownloadItemGtk() {
338 icon_consumer_.CancelAllRequests(); 338 icon_consumer_.CancelAllRequests();
339 StopDownloadProgress(); 339 StopDownloadProgress();
340 get_download()->RemoveObserver(this); 340 get_download()->RemoveObserver(this);
341 g_signal_handlers_disconnect_by_func(parent_shelf_->GetHBox(), 341 g_signal_handlers_disconnect_by_func(parent_shelf_->GetHBox(),
342 reinterpret_cast<gpointer>(OnShelfResized), this); 342 reinterpret_cast<gpointer>(OnShelfResized), this);
343 gtk_widget_show_all(parent_shelf_->GetHBox());
343 344
344 hbox_.Destroy(); 345 hbox_.Destroy();
345 progress_area_.Destroy(); 346 progress_area_.Destroy();
346 body_.Destroy(); 347 body_.Destroy();
347 } 348 }
348 349
349 void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) { 350 void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
350 DCHECK_EQ(download, get_download()); 351 DCHECK_EQ(download, get_download());
351 352
352 if (dangerous_prompt_ != NULL && 353 if (dangerous_prompt_ != NULL &&
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 901
901 // static 902 // static
902 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button, 903 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button,
903 DownloadItemGtk* item) { 904 DownloadItemGtk* item) {
904 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", 905 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
905 base::Time::Now() - item->creation_time_); 906 base::Time::Now() - item->creation_time_);
906 if (item->get_download()->state() == DownloadItem::IN_PROGRESS) 907 if (item->get_download()->state() == DownloadItem::IN_PROGRESS)
907 item->get_download()->Cancel(true); 908 item->get_download()->Cancel(true);
908 item->get_download()->Remove(true); 909 item->get_download()->Remove(true);
909 } 910 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698