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

Unified Diff: chrome/browser/pepper_broker_infobar_delegate.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
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.h ('k') | chrome/browser/plugins/plugin_infobar_delegates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pepper_broker_infobar_delegate.cc
===================================================================
--- chrome/browser/pepper_broker_infobar_delegate.cc (revision 238220)
+++ chrome/browser/pepper_broker_infobar_delegate.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
+#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/plugins/plugin_finder.h"
#include "chrome/browser/plugins/plugin_metadata.h"
@@ -95,11 +96,11 @@
content::UserMetricsAction("PPAPI.BrokerInfobarDisplayed"));
InfoBarService* infobar_service =
InfoBarService::FromWebContents(web_contents);
- infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new PepperBrokerInfoBarDelegate(
- infobar_service, url, plugin_path,
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(new PepperBrokerInfoBarDelegate(
+ url, plugin_path,
profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
- content_settings, tab_content_settings, callback)));
+ content_settings, tab_content_settings, callback))));
return;
}
@@ -112,7 +113,6 @@
}
PepperBrokerInfoBarDelegate::PepperBrokerInfoBarDelegate(
- InfoBarService* infobar_service,
const GURL& url,
const base::FilePath& plugin_path,
const std::string& languages,
@@ -119,7 +119,7 @@
HostContentSettingsMap* content_settings,
TabSpecificContentSettings* tab_content_settings,
const base::Callback<void(bool)>& callback)
- : ConfirmInfoBarDelegate(infobar_service),
+ : ConfirmInfoBarDelegate(),
url_(url),
plugin_path_(plugin_path),
languages_(languages),
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.h ('k') | chrome/browser/plugins/plugin_infobar_delegates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698