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

Unified Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 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/omnibox/alternate_nav_infobar_delegate.h
===================================================================
--- chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h (revision 226624)
+++ chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h (working copy)
@@ -5,14 +5,16 @@
#ifndef CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
#define CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/infobars/infobar_delegate.h"
#include "url/gurl.h"
class AlternateNavInfoBarDelegate : public InfoBarDelegate {
public:
- // Creates an alternate nav infobar delegate and adds it to |infobar_service|.
+ virtual ~AlternateNavInfoBarDelegate();
+
+ // Creates an alternate nav infobar and delegate and adds the infobar to
+ // |infobar_service|.
static void Create(InfoBarService* infobar_service,
const GURL& alternate_nav_url);
@@ -21,12 +23,13 @@
bool LinkClicked(WindowOpenDisposition disposition);
private:
- AlternateNavInfoBarDelegate(InfoBarService* owner,
- const GURL& alternate_nav_url);
- virtual ~AlternateNavInfoBarDelegate();
+ explicit AlternateNavInfoBarDelegate(const GURL& alternate_nav_url);
+ // Returns an alternate nav infobar that owns |delegate|.
+ static scoped_ptr<InfoBar> CreateInfoBar(
+ scoped_ptr<AlternateNavInfoBarDelegate> delegate);
+
// InfoBarDelegate:
- virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE;
virtual int GetIconID() const OVERRIDE;
virtual Type GetInfoBarType() const OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698