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/views/download_shelf_view.h" | 5 #include "chrome/browser/views/download_shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "app/slide_animation.h" | 11 #include "app/slide_animation.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "chrome/browser/download/download_item.h" | 13 #include "chrome/browser/download/download_item.h" |
14 #include "chrome/browser/download/download_item_model.h" | 14 #include "chrome/browser/download/download_item_model.h" |
15 #include "chrome/browser/download/download_manager.h" | 15 #include "chrome/browser/download/download_manager.h" |
16 #include "chrome/browser/tab_contents/navigation_entry.h" | 16 #include "chrome/browser/tab_contents/navigation_entry.h" |
17 #include "chrome/browser/themes/browser_theme_provider.h" | 17 #include "chrome/browser/themes/browser_theme_provider.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/view_ids.h" | 19 #include "chrome/browser/ui/view_ids.h" |
20 #include "chrome/browser/views/download_item_view.h" | 20 #include "chrome/browser/ui/views/download_item_view.h" |
21 #include "chrome/browser/views/frame/browser_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_view.h" |
22 #include "gfx/canvas.h" | 22 #include "gfx/canvas.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
24 #include "grit/theme_resources.h" | 24 #include "grit/theme_resources.h" |
25 #include "views/background.h" | 25 #include "views/background.h" |
26 #include "views/controls/button/image_button.h" | 26 #include "views/controls/button/image_button.h" |
27 #include "views/controls/image_view.h" | 27 #include "views/controls/image_view.h" |
28 | 28 |
29 // Max number of download views we'll contain. Any time a view is added and | 29 // Max number of download views we'll contain. Any time a view is added and |
30 // we already have this many download views, one is removed. | 30 // we already have this many download views, one is removed. |
31 static const size_t kMaxDownloadViews = 15; | 31 static const size_t kMaxDownloadViews = 15; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 const DownloadItemView* download_item_view) { | 431 const DownloadItemView* download_item_view) { |
432 gfx::Rect bounds = download_item_view->bounds(); | 432 gfx::Rect bounds = download_item_view->bounds(); |
433 | 433 |
434 #if defined(TOOLKIT_VIEWS) | 434 #if defined(TOOLKIT_VIEWS) |
435 bounds.set_height(bounds.height() - 1); | 435 bounds.set_height(bounds.height() - 1); |
436 bounds.Offset(0, 3); | 436 bounds.Offset(0, 3); |
437 #endif | 437 #endif |
438 | 438 |
439 return bounds; | 439 return bounds; |
440 } | 440 } |
OLD | NEW |