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

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

Issue 155788: Infobar UI cleanup on Mac. Adds the yellow background gradient and... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/nibs/InfoBar.xib ('k') | chrome/browser/cocoa/infobar_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 @class InfoBarContainerController; 7 @class InfoBarContainerController;
8 class InfoBarDelegate; 8 class InfoBarDelegate;
9 9
10 // A controller for an infobar in the browser window. There is one 10 // A controller for an infobar in the browser window. There is one
11 // controller per infobar view. The base InfoBarController is able to 11 // controller per infobar view. The base InfoBarController is able to
12 // draw an icon, a text message, and a close button. Subclasses can 12 // draw an icon, a text message, and a close button. Subclasses can
13 // override addAdditionalControls to customize the UI. 13 // override addAdditionalControls to customize the UI.
14 @interface InfoBarController : NSViewController { 14 @interface InfoBarController : NSViewController {
15 @private 15 @private
16 InfoBarContainerController* containerController_; // weak, owns us 16 InfoBarContainerController* containerController_; // weak, owns us
17 17
18 @protected 18 @protected
19 InfoBarDelegate* delegate_; // weak 19 InfoBarDelegate* delegate_; // weak
20 IBOutlet NSImageView* image_; 20 IBOutlet NSImageView* image_;
21 IBOutlet NSTextField* label_; 21 IBOutlet NSTextField* label_;
22 IBOutlet NSButton* okButton_;
23 IBOutlet NSButton* cancelButton_;
22 IBOutlet NSButton* closeButton_; 24 IBOutlet NSButton* closeButton_;
23 }; 25 };
24 26
25 // Initializes a new InfoBarController. 27 // Initializes a new InfoBarController.
26 - (id)initWithDelegate:(InfoBarDelegate*)delegate; 28 - (id)initWithDelegate:(InfoBarDelegate*)delegate;
27 29
28 // Dismisses the infobar without taking any action. 30 // Called when someone clicks on the ok or cancel buttons. Subclasses
31 // must override if they do not hide the buttons.
32 - (void)ok:(id)sender;
33 - (void)cancel:(id)sender;
34
35 // Called when someone clicks on the close button. Dismisses the
36 // infobar without taking any action.
29 - (IBAction)dismiss:(id)sender; 37 - (IBAction)dismiss:(id)sender;
30 38
31 // Subclasses can override this method to add additional controls to 39 // Subclasses can override this method to add additional controls to
32 // the infobar view. This method is called by awakeFromNib. The 40 // the infobar view. This method is called by awakeFromNib. The
33 // default implementation does nothing. 41 // default implementation does nothing.
34 - (void)addAdditionalControls; 42 - (void)addAdditionalControls;
35 43
36 @property(assign, nonatomic) InfoBarContainerController* containerController; 44 @property(assign, nonatomic) InfoBarContainerController* containerController;
37 @property(readonly) InfoBarDelegate* delegate; 45 @property(readonly) InfoBarDelegate* delegate;
38 46
(...skipping 15 matching lines...) Expand all
54 - (void)linkClicked; 62 - (void)linkClicked;
55 @end 63 @end
56 64
57 65
58 @interface ConfirmInfoBarController : InfoBarController { 66 @interface ConfirmInfoBarController : InfoBarController {
59 } 67 }
60 // Called when the ok and cancel buttons are clicked. 68 // Called when the ok and cancel buttons are clicked.
61 - (IBAction)ok:(id)sender; 69 - (IBAction)ok:(id)sender;
62 - (IBAction)cancel:(id)sender; 70 - (IBAction)cancel:(id)sender;
63 @end 71 @end
OLDNEW
« no previous file with comments | « chrome/app/nibs/InfoBar.xib ('k') | chrome/browser/cocoa/infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698