| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
| 10 #include "app/text_elider.h" | 10 #include "app/text_elider.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/browser.h" | |
| 18 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/download/download_item.h" | 18 #include "chrome/browser/download/download_item.h" |
| 20 #include "chrome/browser/download/download_item_model.h" | 19 #include "chrome/browser/download/download_item_model.h" |
| 21 #include "chrome/browser/download/download_manager.h" | 20 #include "chrome/browser/download/download_manager.h" |
| 22 #include "chrome/browser/download/download_shelf.h" | 21 #include "chrome/browser/download/download_shelf.h" |
| 23 #include "chrome/browser/download/download_util.h" | 22 #include "chrome/browser/download/download_util.h" |
| 24 #include "chrome/browser/gtk/custom_drag.h" | 23 #include "chrome/browser/gtk/custom_drag.h" |
| 25 #include "chrome/browser/gtk/download_shelf_gtk.h" | 24 #include "chrome/browser/gtk/download_shelf_gtk.h" |
| 26 #include "chrome/browser/gtk/gtk_theme_provider.h" | 25 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 27 #include "chrome/browser/gtk/gtk_util.h" | 26 #include "chrome/browser/gtk/gtk_util.h" |
| 28 #include "chrome/browser/gtk/menu_gtk.h" | 27 #include "chrome/browser/gtk/menu_gtk.h" |
| 29 #include "chrome/browser/gtk/nine_box.h" | 28 #include "chrome/browser/gtk/nine_box.h" |
| 29 #include "chrome/browser/ui/browser.h" |
| 30 #include "chrome/common/notification_service.h" | 30 #include "chrome/common/notification_service.h" |
| 31 #include "gfx/canvas_skia_paint.h" | 31 #include "gfx/canvas_skia_paint.h" |
| 32 #include "gfx/color_utils.h" | 32 #include "gfx/color_utils.h" |
| 33 #include "gfx/font.h" | 33 #include "gfx/font.h" |
| 34 #include "gfx/skia_utils_gtk.h" | 34 #include "gfx/skia_utils_gtk.h" |
| 35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
| 36 #include "grit/theme_resources.h" | 36 #include "grit/theme_resources.h" |
| 37 #include "third_party/skia/include/core/SkBitmap.h" | 37 #include "third_party/skia/include/core/SkBitmap.h" |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 get_download()->DangerousDownloadValidated(); | 871 get_download()->DangerousDownloadValidated(); |
| 872 } | 872 } |
| 873 | 873 |
| 874 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { | 874 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { |
| 875 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", | 875 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", |
| 876 base::Time::Now() - creation_time_); | 876 base::Time::Now() - creation_time_); |
| 877 if (get_download()->state() == DownloadItem::IN_PROGRESS) | 877 if (get_download()->state() == DownloadItem::IN_PROGRESS) |
| 878 get_download()->Cancel(true); | 878 get_download()->Cancel(true); |
| 879 get_download()->Remove(true); | 879 get_download()->Remove(true); |
| 880 } | 880 } |
| OLD | NEW |