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

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

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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.h
===================================================================
--- chrome/browser/ui/cocoa/infobars/infobar.h (revision 87541)
+++ chrome/browser/ui/cocoa/infobars/infobar.h (working copy)
@@ -8,7 +8,11 @@
#include "base/logging.h" // for DCHECK
+#if defined(__OBJC__)
@class InfoBarController;
+#else
+class InfoBarController;
+#endif
// A C++ wrapper around an Objective-C InfoBarController. This class
// exists solely to be the return value for InfoBarDelegate::CreateInfoBar(),
@@ -29,18 +33,24 @@
class InfoBar {
public:
- InfoBar(InfoBarController* controller) {
+ InfoBar(InfoBarController* controller, InfoBarDelegate* delegate)
+ : controller_(controller), delegate_(delegate) {
DCHECK(controller);
- controller_ = controller;
+ DCHECK(delegate);
}
InfoBarController* controller() {
return controller_;
}
+ InfoBarDelegate* delegate() {
+ return delegate_;
+ }
+
private:
// Pointer to the infobar controller. Is never null.
InfoBarController* controller_; // weak
+ InfoBarDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(InfoBar);
};

Powered by Google App Engine
This is Rietveld 408576698