| 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/mac/scoped_nsobject.h" | 7 #include "base/mac/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 #include "ui/base/cocoa/tracking_area.h" | 10 #include "ui/base/cocoa/tracking_area.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Delegate that handles resizing our view. | 79 // Delegate that handles resizing our view. |
| 80 id<ViewResizer> resizeDelegate_; | 80 id<ViewResizer> resizeDelegate_; |
| 81 | 81 |
| 82 // Used for loading pages. | 82 // Used for loading pages. |
| 83 content::PageNavigator* navigator_; | 83 content::PageNavigator* navigator_; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 - (id)initWithBrowser:(Browser*)browser | 86 - (id)initWithBrowser:(Browser*)browser |
| 87 resizeDelegate:(id<ViewResizer>)resizeDelegate; | 87 resizeDelegate:(id<ViewResizer>)resizeDelegate; |
| 88 | 88 |
| 89 // Called by BrowserWindowController when the Browser is being destroyed. |
| 90 - (void)browserWillBeDestroyed; |
| 91 |
| 89 // Run when the user clicks the 'Show All' button. | 92 // Run when the user clicks the 'Show All' button. |
| 90 - (IBAction)showDownloadsTab:(id)sender; | 93 - (IBAction)showDownloadsTab:(id)sender; |
| 91 | 94 |
| 92 // Run when the user clicks the close button on the right side of the shelf. | 95 // Run when the user clicks the close button on the right side of the shelf. |
| 93 - (IBAction)handleClose:(id)sender; | 96 - (IBAction)handleClose:(id)sender; |
| 94 | 97 |
| 95 // Shows or hides the download shelf based on the value of |show|. | 98 // Shows or hides the download shelf based on the value of |show|. |
| 96 // |isUserAction| should be YES if the operation is being triggered based on a | 99 // |isUserAction| should be YES if the operation is being triggered based on a |
| 97 // user action (currently only relevant when hiding the shelf). | 100 // user action (currently only relevant when hiding the shelf). |
| 98 // Note: This is intended to be invoked from DownloadShelfMac. If invoked | 101 // Note: This is intended to be invoked from DownloadShelfMac. If invoked |
| (...skipping 25 matching lines...) Expand all Loading... |
| 124 // release the downloads. | 127 // release the downloads. |
| 125 - (void)exiting; | 128 - (void)exiting; |
| 126 | 129 |
| 127 // Return the height of the download shelf. | 130 // Return the height of the download shelf. |
| 128 - (float)height; | 131 - (float)height; |
| 129 | 132 |
| 130 // Re-layouts all download items based on their current state. | 133 // Re-layouts all download items based on their current state. |
| 131 - (void)layoutItems; | 134 - (void)layoutItems; |
| 132 | 135 |
| 133 @end | 136 @end |
| OLD | NEW |