Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: chrome/browser/cocoa/extension_shelf_controller.h

Issue 175025: Add a bare-bones extension shelf that displays extension items on OS X. (Closed)
Patch Set: Merge ToT, address more comments Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include "base/scoped_ptr.h"
8 #import "chrome/browser/cocoa/view_resizer.h"
9
10 class Browser;
11 class ExtensionShelfMac;
12
13 // A controller for the extension shelf. After creating on object of this class,
14 // insert its |view| into a superview and call |wasInsertedIntoWindow|. After
15 // that, the controller automatically registers itself in the extensions
16 // subsystem and manages displaying toolstrips in the extension shelf.
17 @interface ExtensionShelfController : NSViewController {
18 @private
19 CGFloat shelfHeight_;
20
21 scoped_ptr<ExtensionShelfMac> bridge_;
22
23 // Delegate that handles resizing our view.
24 id<ViewResizer> resizeDelegate_;
25
26 Browser* browser_;
27 }
28
29 // Initializes a new ExtensionShelfController.
30 - (id)initWithBrowser:(Browser*)browser
31 resizeDelegate:(id<ViewResizer>)resizeDelegate;
32
33 // Makes the extension shelf view managed by this class visible.
34 - (IBAction)show:(id)sender;
35
36 // Makes the extension shelf view managed by this class invisible.
37 - (IBAction)hide:(id)sender;
38
39 // Returns the height this shelf has when it's visible (which is different from
40 // the frame's height if the shelf is hidden).
41 - (CGFloat)height;
42
43 // Call this once this shelf's view has been inserted into a superview. It will
44 // create the internal bridge object to chrome's extension system and call
45 // cacheDisplayInRect:toBitmapImageRep: on the |view|, which requires that it is
46 // in a superview.
47 - (void)wasInsertedIntoWindow;
48
49 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/extension_shelf_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698