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

Unified Diff: chrome/browser/ui/cocoa/infobars/infobar_controller.h

Issue 7981045: Make infobars ignore button clicks when closing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/infobars/infobar_controller.h
===================================================================
--- chrome/browser/ui/cocoa/infobars/infobar_controller.h (revision 102206)
+++ chrome/browser/ui/cocoa/infobars/infobar_controller.h (working copy)
@@ -48,14 +48,18 @@
- (id)initWithDelegate:(InfoBarDelegate*)delegate
owner:(TabContentsWrapper*)owner;
+// Returns true if the infobar is owned. If this is false, it is not safe to
+// call any delegate functions, since they might attempt to access the owner.
+- (bool)owned;
Robert Sesek 2011/09/22 16:49:56 This should be an Obj-C BOOL and be YES/NO instead
Peter Kasting 2011/09/22 21:55:25 Done.
+
// Called when someone clicks on the OK or Cancel buttons. Subclasses
// must override if they do not hide the buttons.
- (void)ok:(id)sender;
- (void)cancel:(id)sender;
-// Called when someone clicks on the close button. Dismisses the
-// infobar without taking any action.
-- (IBAction)dismiss:(id)sender;
Robert Sesek 2011/09/22 16:49:56 This needs to stay part of the public header becau
Peter Kasting 2011/09/22 21:55:25 sail informed me that it was safe to move this to
Robert Sesek 2011/09/24 19:20:16 It's technically safe, but as some other entity is
Peter Kasting 2011/09/26 22:34:49 Done.
+// Asks the container controller to remove the infobar for this delegate. This
+// call will trigger a notification that starts the infobar animating closed.
+- (void)removeSelf;
// Returns a pointer to this controller's view, cast as an AnimatableView.
- (AnimatableView*)animatableView;

Powered by Google App Engine
This is Rietveld 408576698