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

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

Issue 1132006: Move app/gfx/canvas and app/gfx/font to gfx/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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
OLDNEW
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/gtk_util.h" 7 #include "app/gtk_util.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/gfx/canvas_paint.h"
10 #include "app/gfx/font.h"
11 #include "app/menus/simple_menu_model.h" 9 #include "app/menus/simple_menu_model.h"
12 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
13 #include "app/slide_animation.h" 11 #include "app/slide_animation.h"
14 #include "app/text_elider.h" 12 #include "app/text_elider.h"
15 #include "base/basictypes.h" 13 #include "base/basictypes.h"
16 #include "base/callback.h" 14 #include "base/callback.h"
17 #include "base/string_util.h" 15 #include "base/string_util.h"
18 #include "base/time.h" 16 #include "base/time.h"
19 #include "chrome/browser/browser.h" 17 #include "chrome/browser/browser.h"
20 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/download/download_item_model.h" 19 #include "chrome/browser/download/download_item_model.h"
22 #include "chrome/browser/download/download_manager.h" 20 #include "chrome/browser/download/download_manager.h"
23 #include "chrome/browser/download/download_shelf.h" 21 #include "chrome/browser/download/download_shelf.h"
24 #include "chrome/browser/download/download_util.h" 22 #include "chrome/browser/download/download_util.h"
25 #include "chrome/browser/gtk/custom_drag.h" 23 #include "chrome/browser/gtk/custom_drag.h"
26 #include "chrome/browser/gtk/download_shelf_gtk.h" 24 #include "chrome/browser/gtk/download_shelf_gtk.h"
27 #include "chrome/browser/gtk/gtk_theme_provider.h" 25 #include "chrome/browser/gtk/gtk_theme_provider.h"
28 #include "chrome/browser/gtk/gtk_util.h" 26 #include "chrome/browser/gtk/gtk_util.h"
29 #include "chrome/browser/gtk/menu_gtk.h" 27 #include "chrome/browser/gtk/menu_gtk.h"
30 #include "chrome/browser/gtk/nine_box.h" 28 #include "chrome/browser/gtk/nine_box.h"
31 #include "chrome/browser/gtk/standard_menus.h" 29 #include "chrome/browser/gtk/standard_menus.h"
32 #include "chrome/common/notification_service.h" 30 #include "chrome/common/notification_service.h"
31 #include "gfx/canvas_paint.h"
33 #include "gfx/color_utils.h" 32 #include "gfx/color_utils.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 {
40 40
41 // The width of the |menu_button_| widget. It has to be at least as wide as the 41 // The width of the |menu_button_| widget. It has to be at least as wide as the
42 // bitmap that we use to draw it, i.e. 16, but can be more. 42 // bitmap that we use to draw it, i.e. 16, but can be more.
43 const int kMenuButtonWidth = 16; 43 const int kMenuButtonWidth = 16;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 852
853 // static 853 // static
854 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button, 854 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button,
855 DownloadItemGtk* item) { 855 DownloadItemGtk* item) {
856 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", 856 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
857 base::Time::Now() - item->creation_time_); 857 base::Time::Now() - item->creation_time_);
858 if (item->get_download()->state() == DownloadItem::IN_PROGRESS) 858 if (item->get_download()->state() == DownloadItem::IN_PROGRESS)
859 item->get_download()->Cancel(true); 859 item->get_download()->Cancel(true);
860 item->get_download()->Remove(true); 860 item->get_download()->Remove(true);
861 } 861 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698