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

Unified Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit again Created 5 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/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/ssl/ssl_add_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_observer.cc
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
index ed901b13186763e83a1ec06e8b5c1aefac283f99..4285ab6b6d7aa1f2cf5b5a52e6d6b0a15321b58f 100644
--- a/chrome/browser/plugins/plugin_observer.cc
+++ b/chrome/browser/plugins/plugin_observer.cc
@@ -25,6 +25,7 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar.h"
+#include "components/infobars/core/infobar_delegate.h"
#include "components/infobars/core/simple_alert_infobar_delegate.h"
#include "components/metrics_services_manager/metrics_services_manager.h"
#include "content/public/browser/plugin_service.h"
@@ -137,6 +138,7 @@ class ReloadPluginInfoBarDelegate : public ConfirmInfoBarDelegate {
~ReloadPluginInfoBarDelegate() override;
// ConfirmInfobarDelegate:
+ infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
int GetIconId() const override;
gfx::VectorIconId GetVectorIconId() const override;
base::string16 GetMessageText() const override;
@@ -166,6 +168,11 @@ ReloadPluginInfoBarDelegate::ReloadPluginInfoBarDelegate(
ReloadPluginInfoBarDelegate::~ReloadPluginInfoBarDelegate(){ }
+infobars::InfoBarDelegate::InfoBarIdentifier
+ReloadPluginInfoBarDelegate::GetIdentifier() const {
+ return RELOAD_PLUGIN_INFOBAR_DELEGATE;
+}
+
int ReloadPluginInfoBarDelegate::GetIconId() const {
return IDR_INFOBAR_PLUGIN_CRASHED;
}
@@ -417,6 +424,7 @@ void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) {
PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path);
SimpleAlertInfoBarDelegate::Create(
InfoBarService::FromWebContents(web_contents()),
+ infobars::InfoBarDelegate::PLUGIN_OBSERVER,
IDR_INFOBAR_PLUGIN_CRASHED,
#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID)
gfx::VectorIconId::EXTENSION_CRASHED,
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/ssl/ssl_add_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698