Index: trunk/src/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc |
=================================================================== |
--- trunk/src/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc (revision 238401) |
+++ trunk/src/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc (working copy) |
@@ -9,7 +9,6 @@ |
#include "chrome/browser/history/history_service_factory.h" |
#include "chrome/browser/history/shortcuts_backend.h" |
#include "chrome/browser/history/shortcuts_backend_factory.h" |
-#include "chrome/browser/infobars/infobar.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "content/public/browser/web_contents.h" |
@@ -18,9 +17,6 @@ |
#include "ui/base/l10n/l10n_util.h" |
-AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { |
-} |
- |
// static |
void AlternateNavInfoBarDelegate::Create( |
content::WebContents* web_contents, |
@@ -29,18 +25,20 @@ |
const GURL& search_url) { |
InfoBarService* infobar_service = |
InfoBarService::FromWebContents(web_contents); |
- infobar_service->AddInfoBar(AlternateNavInfoBarDelegate::CreateInfoBar( |
- scoped_ptr<AlternateNavInfoBarDelegate>(new AlternateNavInfoBarDelegate( |
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( |
+ new AlternateNavInfoBarDelegate( |
+ infobar_service, |
Profile::FromBrowserContext(web_contents->GetBrowserContext()), text, |
- match, search_url)))); |
+ match, search_url))); |
} |
AlternateNavInfoBarDelegate::AlternateNavInfoBarDelegate( |
+ InfoBarService* owner, |
Profile* profile, |
const string16& text, |
const AutocompleteMatch& match, |
const GURL& search_url) |
- : InfoBarDelegate(), |
+ : InfoBarDelegate(owner), |
profile_(profile), |
text_(text), |
match_(match), |
@@ -49,8 +47,8 @@ |
DCHECK(search_url_.is_valid()); |
} |
-// AlternateNavInfoBarDelegate::CreateInfoBar() is implemented in |
-// platform-specific files. |
+AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { |
+} |
string16 AlternateNavInfoBarDelegate::GetMessageTextWithOffset( |
size_t* link_offset) const { |