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

Unified Diff: chrome/browser/ui/extensions/extension_install_ui_default.cc

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 6 years, 9 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/extensions/extension_install_ui_default.cc
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc
index 6fa1d4a5e1bff8739511736822e38f04de6bc3d1..eacb18c21862ef90cce2443843bf895fe5b009f2 100644
--- a/chrome/browser/ui/extensions/extension_install_ui_default.cc
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc
@@ -10,8 +10,9 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/infobars/content_confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
+#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile.h"
@@ -79,7 +80,7 @@ void ShowExtensionInstalledBubble(const extensions::Extension* extension,
// ErrorInfoBarDelegate -------------------------------------------------------
// Helper class to put up an infobar when installation fails.
-class ErrorInfoBarDelegate : public ConfirmInfoBarDelegate {
+class ErrorInfoBarDelegate : public ContentConfirmInfoBarDelegate {
public:
// Creates an error infobar and delegate and adds the infobar to
// |infobar_service|.
@@ -87,7 +88,8 @@ class ErrorInfoBarDelegate : public ConfirmInfoBarDelegate {
const extensions::CrxInstallerError& error);
private:
- explicit ErrorInfoBarDelegate(const extensions::CrxInstallerError& error);
+ explicit ErrorInfoBarDelegate(content::WebContents* web_contents,
+ const extensions::CrxInstallerError& error);
virtual ~ErrorInfoBarDelegate();
// ConfirmInfoBarDelegate:
@@ -104,15 +106,15 @@ class ErrorInfoBarDelegate : public ConfirmInfoBarDelegate {
// static
void ErrorInfoBarDelegate::Create(InfoBarService* infobar_service,
const extensions::CrxInstallerError& error) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new ErrorInfoBarDelegate(error))));
+ infobar_service->AddInfoBar(
+ ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
+ new ErrorInfoBarDelegate(infobar_service->web_contents(), error))));
}
ErrorInfoBarDelegate::ErrorInfoBarDelegate(
+ content::WebContents* web_contents,
const extensions::CrxInstallerError& error)
- : ConfirmInfoBarDelegate(),
- error_(error) {
-}
+ : ContentConfirmInfoBarDelegate(web_contents), error_(error) {}
ErrorInfoBarDelegate::~ErrorInfoBarDelegate() {
}

Powered by Google App Engine
This is Rietveld 408576698