OLD | NEW |
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_shelf_gtk.h" | 5 #include "chrome/browser/ui/gtk/download_shelf_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | |
11 #include "chrome/browser/download/download_item.h" | 10 #include "chrome/browser/download/download_item.h" |
12 #include "chrome/browser/download/download_item_model.h" | 11 #include "chrome/browser/download/download_item_model.h" |
13 #include "chrome/browser/download/download_util.h" | 12 #include "chrome/browser/download/download_util.h" |
14 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 14 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
16 #include "chrome/browser/ui/gtk/custom_button.h" | 15 #include "chrome/browser/ui/gtk/custom_button.h" |
17 #include "chrome/browser/ui/gtk/download_item_gtk.h" | 16 #include "chrome/browser/ui/gtk/download_item_gtk.h" |
18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 17 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
19 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" | 18 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" |
20 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 19 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
21 #include "chrome/browser/ui/gtk/gtk_util.h" | 20 #include "chrome/browser/ui/gtk/gtk_util.h" |
22 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
23 #include "gfx/gtk_util.h" | 22 #include "gfx/gtk_util.h" |
24 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
25 #include "grit/theme_resources.h" | 24 #include "grit/theme_resources.h" |
| 25 #include "ui/base/resource/resource_bundle.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // The height of the download items. | 29 // The height of the download items. |
30 const int kDownloadItemHeight = download_util::kSmallProgressIconSize; | 30 const int kDownloadItemHeight = download_util::kSmallProgressIconSize; |
31 | 31 |
32 // Padding between the download widgets. | 32 // Padding between the download widgets. |
33 const int kDownloadItemPadding = 10; | 33 const int kDownloadItemPadding = 10; |
34 | 34 |
35 // Padding between the top/bottom of the download widgets and the edge of the | 35 // Padding between the top/bottom of the download widgets and the edge of the |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 void DownloadShelfGtk::OnButtonClick(GtkWidget* button) { | 262 void DownloadShelfGtk::OnButtonClick(GtkWidget* button) { |
263 if (button == close_button_->widget()) { | 263 if (button == close_button_->widget()) { |
264 Close(); | 264 Close(); |
265 } else { | 265 } else { |
266 // The link button was clicked. | 266 // The link button was clicked. |
267 browser_->ShowDownloadsTab(); | 267 browser_->ShowDownloadsTab(); |
268 } | 268 } |
269 } | 269 } |
OLD | NEW |