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

Unified Diff: trunk/src/chrome/browser/ui/views/infobars/extension_infobar.h

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/ui/views/infobars/extension_infobar.h
===================================================================
--- trunk/src/chrome/browser/ui/views/infobars/extension_infobar.h (revision 238401)
+++ trunk/src/chrome/browser/ui/views/infobars/extension_infobar.h (working copy)
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_
#include "base/compiler_specific.h"
+#include "chrome/browser/extensions/extension_infobar_delegate.h"
#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include "ui/views/controls/button/menu_button_listener.h"
class Browser;
-class ExtensionInfoBarDelegate;
namespace views {
class ImageView;
@@ -18,9 +18,11 @@
}
class ExtensionInfoBar : public InfoBarView,
+ public ExtensionInfoBarDelegate::DelegateObserver,
public views::MenuButtonListener {
public:
- ExtensionInfoBar(scoped_ptr<ExtensionInfoBarDelegate> delegate,
+ ExtensionInfoBar(InfoBarService* owner,
+ ExtensionInfoBarDelegate* delegate,
Browser* browser);
private:
@@ -32,6 +34,9 @@
const ViewHierarchyChangedDetails& details) OVERRIDE;
virtual int ContentMinimumWidth() const OVERRIDE;
+ // ExtensionInfoBarDelegate::DelegateObserver:
+ virtual void OnDelegateDeleted() OVERRIDE;
+
// views::MenuButtonListener:
virtual void OnMenuButtonClicked(views::View* source,
const gfx::Point& point) OVERRIDE;
@@ -40,6 +45,11 @@
ExtensionInfoBarDelegate* GetDelegate();
+ // TODO(pkasting): This shadows InfoBarView::delegate_. Get rid of this once
+ // InfoBars own their delegates (and thus we don't need the DelegateObserver
+ // functionality). For now, almost everyone should use GetDelegate() instead.
+ InfoBarDelegate* delegate_;
+
Browser* browser_;
// The infobar icon used for the extension infobar. The icon can be either a

Powered by Google App Engine
This is Rietveld 408576698