| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/memory/scoped_nsobject.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #import "chrome/browser/ui/cocoa/view_resizer.h" | 9 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 10 | 10 |
| 11 @class AnimatableView; | 11 @class AnimatableView; |
| 12 class Browser; | 12 class Browser; |
| 13 @class BrowserWindowController; | 13 @class BrowserWindowController; |
| 14 @class DownloadItemController; | 14 @class DownloadItemController; |
| 15 class DownloadItemModel; | |
| 16 class DownloadShelf; | 15 class DownloadShelf; |
| 17 @class DownloadShelfView; | 16 @class DownloadShelfView; |
| 18 @class HyperlinkButtonCell; | 17 @class HyperlinkButtonCell; |
| 19 @class HoverButton; | 18 @class HoverButton; |
| 20 | 19 |
| 21 namespace content { | 20 namespace content { |
| 21 class DownloadItem; |
| 22 class PageNavigator; | 22 class PageNavigator; |
| 23 } | 23 } |
| 24 | 24 |
| 25 // A controller class that manages the download shelf for one window. It is | 25 // A controller class that manages the download shelf for one window. It is |
| 26 // responsible for the behavior of the shelf itself (showing/hiding, handling | 26 // responsible for the behavior of the shelf itself (showing/hiding, handling |
| 27 // the link, layout) as well as for managing the download items it contains. | 27 // the link, layout) as well as for managing the download items it contains. |
| 28 // | 28 // |
| 29 // All the files in cocoa/downloads_* are related as follows: | 29 // All the files in cocoa/downloads_* are related as follows: |
| 30 // | 30 // |
| 31 // download_shelf_mac bridges calls from chromium's c++ world to the objc | 31 // download_shelf_mac bridges calls from chromium's c++ world to the objc |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 - (AnimatableView*)animatableView; | 83 - (AnimatableView*)animatableView; |
| 84 | 84 |
| 85 - (DownloadShelf*)bridge; | 85 - (DownloadShelf*)bridge; |
| 86 - (BOOL)isVisible; | 86 - (BOOL)isVisible; |
| 87 | 87 |
| 88 - (IBAction)show:(id)sender; | 88 - (IBAction)show:(id)sender; |
| 89 | 89 |
| 90 // Run when the user clicks the close button on the right side of the shelf. | 90 // Run when the user clicks the close button on the right side of the shelf. |
| 91 - (IBAction)hide:(id)sender; | 91 - (IBAction)hide:(id)sender; |
| 92 | 92 |
| 93 - (void)addDownloadItem:(DownloadItemModel*)model; | 93 - (void)addDownloadItem:(content::DownloadItem*)downloadItem; |
| 94 | 94 |
| 95 // Remove a download, possibly via clearing browser data. | 95 // Remove a download, possibly via clearing browser data. |
| 96 - (void)remove:(DownloadItemController*)download; | 96 - (void)remove:(DownloadItemController*)download; |
| 97 | 97 |
| 98 // Called by individual item controllers when their downloads are opened. | 98 // Called by individual item controllers when their downloads are opened. |
| 99 - (void)downloadWasOpened:(DownloadItemController*)download; | 99 - (void)downloadWasOpened:(DownloadItemController*)download; |
| 100 | 100 |
| 101 // Notification that we are closing and should release our downloads. | 101 // Notification that we are closing and should release our downloads. |
| 102 - (void)exiting; | 102 - (void)exiting; |
| 103 | 103 |
| 104 // Return the height of the download shelf. | 104 // Return the height of the download shelf. |
| 105 - (float)height; | 105 - (float)height; |
| 106 | 106 |
| 107 // Re-layouts all download items based on their current state. | 107 // Re-layouts all download items based on their current state. |
| 108 - (void)layoutItems; | 108 - (void)layoutItems; |
| 109 | 109 |
| 110 @end | 110 @end |
| OLD | NEW |