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

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

Issue 6249022: Make the gtk download shelf autoclose on mouse out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fewer changes Created 9 years, 10 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 | chrome/browser/ui/gtk/download_shelf_gtk.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/gtk/download_item_gtk.h" 5 #include "chrome/browser/ui/gtk/download_item_gtk.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 if (child) 792 if (child)
793 gtk_container_propagate_expose(GTK_CONTAINER(widget), child, e); 793 gtk_container_propagate_expose(GTK_CONTAINER(widget), child, e);
794 794
795 return TRUE; 795 return TRUE;
796 } 796 }
797 797
798 void DownloadItemGtk::OnClick(GtkWidget* widget) { 798 void DownloadItemGtk::OnClick(GtkWidget* widget) {
799 UMA_HISTOGRAM_LONG_TIMES("clickjacking.open_download", 799 UMA_HISTOGRAM_LONG_TIMES("clickjacking.open_download",
800 base::Time::Now() - creation_time_); 800 base::Time::Now() - creation_time_);
801 get_download()->OpenDownload(); 801 get_download()->OpenDownload();
802 parent_shelf_->ItemOpened();
802 } 803 }
803 804
804 gboolean DownloadItemGtk::OnProgressAreaExpose(GtkWidget* widget, 805 gboolean DownloadItemGtk::OnProgressAreaExpose(GtkWidget* widget,
805 GdkEventExpose* event) { 806 GdkEventExpose* event) {
806 // Create a transparent canvas. 807 // Create a transparent canvas.
807 gfx::CanvasSkiaPaint canvas(event, false); 808 gfx::CanvasSkiaPaint canvas(event, false);
808 if (complete_animation_.get()) { 809 if (complete_animation_.get()) {
809 if (complete_animation_->is_animating()) { 810 if (complete_animation_->is_animating()) {
810 download_util::PaintDownloadComplete(&canvas, 811 download_util::PaintDownloadComplete(&canvas,
811 widget->allocation.x, widget->allocation.y, 812 widget->allocation.x, widget->allocation.y,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 get_download()->DangerousDownloadValidated(); 871 get_download()->DangerousDownloadValidated();
871 } 872 }
872 873
873 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { 874 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) {
874 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", 875 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
875 base::Time::Now() - creation_time_); 876 base::Time::Now() - creation_time_);
876 if (get_download()->state() == DownloadItem::IN_PROGRESS) 877 if (get_download()->state() == DownloadItem::IN_PROGRESS)
877 get_download()->Cancel(true); 878 get_download()->Cancel(true);
878 get_download()->Remove(true); 879 get_download()->Remove(true);
879 } 880 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/download_shelf_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698