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

Unified Diff: chrome/browser/extensions/extension_infobar_delegate.h

Issue 4767001: Make TabContents own its infobar delegates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/extensions/extension_infobar_delegate.h
===================================================================
--- chrome/browser/extensions/extension_infobar_delegate.h (revision 65711)
+++ chrome/browser/extensions/extension_infobar_delegate.h (working copy)
@@ -18,26 +18,16 @@
class ExtensionInfoBarDelegate : public InfoBarDelegate,
public NotificationObserver {
public:
- // The observer for when the delegate dies.
- class DelegateObserver {
- public:
- virtual void OnDelegateDeleted() = 0;
-
- protected:
- virtual ~DelegateObserver() {}
- };
-
- ExtensionInfoBarDelegate(Browser* browser, TabContents* contents,
- const Extension* extension, const GURL& url);
+ ExtensionInfoBarDelegate(Browser* browser,
+ TabContents* contents,
+ const Extension* extension,
+ const GURL& url);
~ExtensionInfoBarDelegate();
const Extension* extension() { return extension_; }
ExtensionHost* extension_host() { return extension_host_.get(); }
- void set_observer(DelegateObserver* observer) { observer_ = observer; }
-
// Overridden from InfoBarDelegate:
- virtual void InfoBarDismissed() { closing_ = true; }
virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
virtual void InfoBarClosed();
virtual InfoBar* CreateInfoBar();
@@ -49,7 +39,6 @@
const NotificationSource& source,
const NotificationDetails& details);
- bool closing() { return closing_; }
private:
// The extension host we are showing the InfoBar for. The delegate needs to
// own this since the InfoBar gets deleted and recreated when you switch tabs
@@ -57,19 +46,12 @@
// get lost at that point.
scoped_ptr<ExtensionHost> extension_host_;
- // The observer monitoring when the delegate dies.
- DelegateObserver* observer_;
-
const Extension* extension_;
TabContents* tab_contents_;
NotificationRegistrar registrar_;
- // Whether we are currently animating to close. This is used to ignore
- // ExtensionView::PreferredSizeChanged notifications.
- bool closing_;
-
DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698