| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 | 8 |
| 9 class Browser; | 9 class Browser; |
| 10 @class BrowserWindowController; | 10 @class BrowserWindowController; |
| 11 class DownloadShelf; | 11 class DownloadShelf; |
| 12 @class DownloadShelfView; | 12 @class DownloadShelfView; |
| 13 | 13 |
| 14 // A controller class that manages the download shelf for one window. | 14 // A controller class that manages the download shelf for one window. |
| 15 | 15 |
| 16 @interface DownloadShelfController : NSViewController { | 16 @interface DownloadShelfController : NSViewController { |
| 17 @private | 17 @private |
| 18 IBOutlet NSTextView* showAllDownloadsLink_; |
| 19 |
| 18 // Currently these two are always the same, but they mean slightly | 20 // Currently these two are always the same, but they mean slightly |
| 19 // different things. contentAreaHasOffset_ is an implementation | 21 // different things. contentAreaHasOffset_ is an implementation |
| 20 // detail of download shelf visibility. | 22 // detail of download shelf visibility. |
| 21 BOOL contentAreaHasOffset_; | 23 BOOL contentAreaHasOffset_; |
| 22 BOOL barIsVisible_; | 24 BOOL barIsVisible_; |
| 23 | 25 |
| 24 scoped_ptr<DownloadShelf> bridge_; | 26 scoped_ptr<DownloadShelf> bridge_; |
| 25 NSView* contentArea_; | 27 NSView* contentArea_; |
| 26 int shelfHeight_; | 28 int shelfHeight_; |
| 27 }; | 29 }; |
| 28 | 30 |
| 29 - (id)initWithBrowser:(Browser*)browser | 31 - (id)initWithBrowser:(Browser*)browser |
| 30 contentArea:(NSView*)content; | 32 contentArea:(NSView*)content; |
| 31 | 33 |
| 32 - (DownloadShelf*)bridge; | 34 - (DownloadShelf*)bridge; |
| 33 - (BOOL)isVisible; | 35 - (BOOL)isVisible; |
| 34 | 36 |
| 35 - (IBAction)show:(id)sender; | 37 - (IBAction)show:(id)sender; |
| 36 - (IBAction)hide:(id)sender; | 38 - (IBAction)hide:(id)sender; |
| 37 | 39 |
| 38 // TODO(thakis): this should internally build an item and get only | 40 // TODO(thakis): this should internally build an item and get only |
| 39 // the model as parameter. | 41 // the model as parameter. |
| 40 - (void)addDownloadItem:(NSView*)view; | 42 - (void)addDownloadItem:(NSView*)view; |
| 41 | 43 |
| 42 // Resizes the download shelf based on the state of the content area. | 44 // Resizes the download shelf based on the state of the content area. |
| 43 - (void)resizeDownloadShelf; | 45 - (void)resizeDownloadShelf; |
| 44 | 46 |
| 45 @end | 47 @end |
| OLD | NEW |