blob: c1beb695f2b6878ee52fb93d7e03f3e7fa2840e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
class BaseDownloadItemModel;
class Browser;
@class BrowserWindowController;
@class DownloadItemController;
class DownloadShelf;
@class DownloadShelfView;
// A controller class that manages the download shelf for one window.
@interface DownloadShelfController : NSViewController {
@private
IBOutlet NSTextView* showAllDownloadsLink_;
// Currently these two are always the same, but they mean slightly different
// things. |contentAreaHasOffset_| is an implementation detail of the download
// shelf visibility.
BOOL contentAreaHasOffset_;
BOOL barIsVisible_;
scoped_ptr<DownloadShelf> bridge_;
NSView* contentArea_;
int shelfHeight_;
// The download items we have added to our shelf.
scoped_nsobject<NSMutableArray> downloadItemControllers_;
};
- (id)initWithBrowser:(Browser*)browser contentArea:(NSView*)content;
- (DownloadShelf*)bridge;
- (BOOL)isVisible;
- (IBAction)show:(id)sender;
- (IBAction)hide:(id)sender;
- (void)addDownloadItem:(BaseDownloadItemModel*)model;
// Resizes the download shelf based on the state of the content area.
- (void)resizeDownloadShelf;
@end
|