blob: eec8a6009aa1ecf5b3f7ba422098e3278955f3db (
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
51
52
|
// 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.
#ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
#define CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
#import <Cocoa/Cocoa.h>
#include "base/scoped_nsobject.h"
@class BookmarkBarStateController;
class BookmarkModel;
class Profile;
@class ToolbarView;
// A controller for the bookmark bar in the browser window. Handles showing
// and hiding based on the preference in the given profile.
@interface BookmarkBarController : NSObject {
@private
BookmarkModel* bookmarkModel_; // weak; part of the profile owned by the
// top-level Browser object.
// Controller for bookmark bar state, shared among all TabContents.
scoped_nsobject<BookmarkBarStateController> bookmarkBarStateController_;
BOOL contentAreaHasOffset_;
// TODO(jrg): write a BookmarkView
IBOutlet ToolbarView* /* BookmarkView* */ bookmarkView_;
IBOutlet NSView* contentArea_;
}
// Initializes the controller with the given browser profile and content view.
- (id)initWithProfile:(Profile*)profile
contentArea:(NSView*)content;
// Returns whether or not the bookmark bar is visible.
- (BOOL)isBookmarkBarVisible;
// Toggle the state of the bookmark bar.
- (void)toggleBookmarkBar;
@end
// These APIs should only be used by unit tests, in place of "friend" classes.
@interface BookmarkBarController(TestingAPI)
// Access to the bookmark bar's view represented by this controller.
- (NSView*)view;
@end
#endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
|