| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "chrome/browser/download/download_item_model.h" | 12 #include "chrome/browser/download/download_item_model.h" |
| 12 #include "chrome/browser/download/download_manager.h" | 13 #include "chrome/browser/download/download_manager.h" |
| 13 #include "chrome/browser/tab_contents/navigation_entry.h" | 14 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 14 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 15 #include "chrome/browser/views/download_item_view.h" | 16 #include "chrome/browser/views/download_item_view.h" |
| 16 #include "chrome/common/gfx/chrome_canvas.h" | 17 #include "chrome/common/gfx/chrome_canvas.h" |
| 17 #include "chrome/common/l10n_util.h" | |
| 18 #include "chrome/views/background.h" | 18 #include "chrome/views/background.h" |
| 19 #include "chrome/views/controls/button/image_button.h" | 19 #include "chrome/views/controls/button/image_button.h" |
| 20 #include "chrome/views/controls/image_view.h" | 20 #include "chrome/views/controls/image_view.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| 23 | 23 |
| 24 // Max number of download views we'll contain. Any time a view is added and | 24 // Max number of download views we'll contain. Any time a view is added and |
| 25 // we already have this many download views, one is removed. | 25 // we already have this many download views, one is removed. |
| 26 static const int kMaxDownloadViews = 15; | 26 static const int kMaxDownloadViews = 15; |
| 27 | 27 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 ShowAllDownloads(); | 262 ShowAllDownloads(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void DownloadShelfView::ButtonPressed(views::Button* button) { | 265 void DownloadShelfView::ButtonPressed(views::Button* button) { |
| 266 shelf_animation_->Hide(); | 266 shelf_animation_->Hide(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 bool DownloadShelfView::IsShowing() const { | 269 bool DownloadShelfView::IsShowing() const { |
| 270 return shelf_animation_->IsShowing(); | 270 return shelf_animation_->IsShowing(); |
| 271 } | 271 } |
| OLD | NEW |