| 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 #import "chrome/browser/cocoa/download_shelf_controller.h" | 5 #import "chrome/browser/cocoa/download_shelf_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/mac_util.h" | 9 #include "base/mac_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "chrome/browser/browser.h" | 11 #include "chrome/browser/browser.h" |
| 12 #include "chrome/browser/browser_theme_provider.h" | |
| 13 #import "chrome/browser/cocoa/animatable_view.h" | 12 #import "chrome/browser/cocoa/animatable_view.h" |
| 13 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
| 14 #import "chrome/browser/cocoa/browser_window_controller.h" | 14 #import "chrome/browser/cocoa/browser_window_controller.h" |
| 15 #include "chrome/browser/cocoa/browser_window_cocoa.h" | |
| 16 #include "chrome/browser/cocoa/download_item_controller.h" | 15 #include "chrome/browser/cocoa/download_item_controller.h" |
| 17 #include "chrome/browser/cocoa/download_shelf_mac.h" | 16 #include "chrome/browser/cocoa/download_shelf_mac.h" |
| 18 #import "chrome/browser/cocoa/download_shelf_view.h" | 17 #import "chrome/browser/cocoa/download_shelf_view.h" |
| 19 #import "chrome/browser/cocoa/hyperlink_button_cell.h" | 18 #import "chrome/browser/cocoa/hyperlink_button_cell.h" |
| 20 #include "chrome/browser/download/download_item.h" | 19 #include "chrome/browser/download/download_item.h" |
| 21 #include "chrome/browser/download/download_manager.h" | 20 #include "chrome/browser/download/download_manager.h" |
| 22 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profile.h" |
| 22 #include "chrome/browser/themes/browser_theme_provider.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 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 25 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 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 const size_t kMaxDownloadItemCount = 16; | 31 const size_t kMaxDownloadItemCount = 16; |
| 32 | 32 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 if (isTransferDone && | 318 if (isTransferDone && |
| 319 [itemController download]->safety_state() != DownloadItem::DANGEROUS) { | 319 [itemController download]->safety_state() != DownloadItem::DANGEROUS) { |
| 320 [self remove:itemController]; | 320 [self remove:itemController]; |
| 321 } else { | 321 } else { |
| 322 ++i; | 322 ++i; |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 @end | 327 @end |
| OLD | NEW |