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

Unified Diff: chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc
===================================================================
--- chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc (revision 238220)
+++ chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc (working copy)
@@ -9,6 +9,8 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/infobars/infobar.h"
+#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/metro_utils/metro_chrome_win.h"
#include "chrome/browser/profiles/profile.h"
@@ -43,10 +45,9 @@
content::Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK,
false);
content::WebContents* web_contents = displayer.browser()->OpenURL(params);
- InfoBarService* info_bar_service =
- InfoBarService::FromWebContents(web_contents);
- info_bar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new AppMetroInfoBarDelegateWin(info_bar_service, mode, extension_id)));
+ InfoBarService::FromWebContents(web_contents)->AddInfoBar(
+ ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
+ new AppMetroInfoBarDelegateWin(mode, extension_id))));
// Use PostTask because we can get here in a COM SendMessage, and
// ActivateApplication can not be sent nested (returns error
@@ -56,10 +57,9 @@
}
AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
- InfoBarService* info_bar_service,
Mode mode,
const std::string& extension_id)
- : ConfirmInfoBarDelegate(info_bar_service),
+ : ConfirmInfoBarDelegate(),
mode_(mode),
extension_id_(extension_id) {
DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty());
« no previous file with comments | « chrome/browser/ui/apps/app_metro_infobar_delegate_win.h ('k') | chrome/browser/ui/auto_login_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698