| OLD | NEW |
| 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_shelf_gtk.h" | 5 #include "chrome/browser/gtk/download_shelf_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" |
| 7 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 8 #include "base/gfx/gtk_util.h" | 9 #include "base/gfx/gtk_util.h" |
| 9 #include "chrome/browser/download/download_item_model.h" | 10 #include "chrome/browser/download/download_item_model.h" |
| 10 #include "chrome/browser/gtk/custom_button.h" | 11 #include "chrome/browser/gtk/custom_button.h" |
| 11 #include "chrome/browser/gtk/download_item_gtk.h" | 12 #include "chrome/browser/gtk/download_item_gtk.h" |
| 12 #include "chrome/browser/gtk/link_button_gtk.h" | 13 #include "chrome/browser/gtk/link_button_gtk.h" |
| 13 #include "chrome/browser/gtk/slide_animator_gtk.h" | 14 #include "chrome/browser/gtk/slide_animator_gtk.h" |
| 14 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 15 #include "chrome/common/l10n_util.h" | |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // The height of the download items. Should be at least 28, as that is the | 21 // The height of the download items. Should be at least 28, as that is the |
| 22 // minimum height of their nineboxes. | 22 // minimum height of their nineboxes. |
| 23 const int kDownloadItemHeight = 38; | 23 const int kDownloadItemHeight = 38; |
| 24 | 24 |
| 25 // Padding between the download widgets. | 25 // Padding between the download widgets. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // static | 142 // static |
| 143 void DownloadShelfGtk::OnButtonClick(GtkWidget* button, | 143 void DownloadShelfGtk::OnButtonClick(GtkWidget* button, |
| 144 DownloadShelfGtk* shelf) { | 144 DownloadShelfGtk* shelf) { |
| 145 if (button == shelf->close_button_->widget()) { | 145 if (button == shelf->close_button_->widget()) { |
| 146 shelf->slide_widget_->Close(); | 146 shelf->slide_widget_->Close(); |
| 147 } else { | 147 } else { |
| 148 // The link button was clicked. | 148 // The link button was clicked. |
| 149 shelf->ShowAllDownloads(); | 149 shelf->ShowAllDownloads(); |
| 150 } | 150 } |
| 151 } | 151 } |
| OLD | NEW |