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 "chrome/browser/download/download_item.h" | 9 #include "chrome/browser/download/download_item.h" |
10 #include "chrome/browser/download/download_item_model.h" | 10 #include "chrome/browser/download/download_item_model.h" |
11 #include "chrome/browser/download/download_util.h" | 11 #include "chrome/browser/download/download_util.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 13 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
14 #include "chrome/browser/ui/gtk/custom_button.h" | 14 #include "chrome/browser/ui/gtk/custom_button.h" |
15 #include "chrome/browser/ui/gtk/download_item_gtk.h" | 15 #include "chrome/browser/ui/gtk/download_item_gtk.h" |
16 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 16 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
17 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" | 17 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" |
18 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 18 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
19 #include "chrome/browser/ui/gtk/gtk_util.h" | 19 #include "chrome/browser/ui/gtk/gtk_util.h" |
20 #include "chrome/common/notification_service.h" | 20 #include "chrome/common/notification_service.h" |
21 #include "gfx/gtk_util.h" | |
22 #include "gfx/insets.h" | |
23 #include "gfx/point.h" | |
24 #include "gfx/rect.h" | |
25 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
26 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
27 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
28 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "ui/gfx/gtk_util.h" |
| 26 #include "ui/gfx/insets.h" |
| 27 #include "ui/gfx/point.h" |
| 28 #include "ui/gfx/rect.h" |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // The height of the download items. | 32 // The height of the download items. |
33 const int kDownloadItemHeight = download_util::kSmallProgressIconSize; | 33 const int kDownloadItemHeight = download_util::kSmallProgressIconSize; |
34 | 34 |
35 // Padding between the download widgets. | 35 // Padding between the download widgets. |
36 const int kDownloadItemPadding = 10; | 36 const int kDownloadItemPadding = 10; |
37 | 37 |
38 // Padding between the top/bottom of the download widgets and the edge of the | 38 // Padding between the top/bottom of the download widgets and the edge of the |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 369 |
370 MessageLoop::current()->PostDelayedTask( | 370 MessageLoop::current()->PostDelayedTask( |
371 FROM_HERE, | 371 FROM_HERE, |
372 auto_close_factory_.NewRunnableMethod(&DownloadShelfGtk::Close), | 372 auto_close_factory_.NewRunnableMethod(&DownloadShelfGtk::Close), |
373 kAutoCloseDelayMs); | 373 kAutoCloseDelayMs); |
374 } | 374 } |
375 | 375 |
376 void DownloadShelfGtk::MouseEnteredShelf() { | 376 void DownloadShelfGtk::MouseEnteredShelf() { |
377 auto_close_factory_.RevokeAll(); | 377 auto_close_factory_.RevokeAll(); |
378 } | 378 } |
OLD | NEW |