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

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

Issue 10967081: Remove dependency of plugin infobar delegates on PluginObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dfgdsfgxc Created 8 years, 3 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
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/plugins/plugin_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_infobar_delegates.cc
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index 556bc2480db9a4a74ac01e8045e9efc63e30ba46..a3ea6339231cdea9840be0aa8ac331106445c3db 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
-#include "chrome/browser/plugins/plugin_observer.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
@@ -155,7 +154,7 @@ bool UnauthorizedPluginInfoBarDelegate::LinkClicked(
// OutdatedPluginInfoBarDelegate ----------------------------------------------
InfoBarDelegate* OutdatedPluginInfoBarDelegate::Create(
- PluginObserver* observer,
+ content::WebContents* web_contents,
PluginInstaller* installer) {
string16 message;
switch (installer->state()) {
@@ -169,20 +168,19 @@ InfoBarDelegate* OutdatedPluginInfoBarDelegate::Create(
break;
}
return new OutdatedPluginInfoBarDelegate(
- observer, installer, message);
+ web_contents, installer, message);
}
OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate(
- PluginObserver* observer,
+ content::WebContents* web_contents,
PluginInstaller* installer,
const string16& message)
: PluginInfoBarDelegate(
InfoBarService::FromTabContents(
- TabContents::FromWebContents(observer->web_contents())),
+ TabContents::FromWebContents(web_contents)),
installer->name(),
installer->identifier()),
WeakPluginInstallerObserver(installer),
- observer_(observer),
message_(message) {
content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown"));
std::string name = UTF16ToUTF8(installer->name());
@@ -236,7 +234,7 @@ bool OutdatedPluginInfoBarDelegate::Accept() {
installer()->OpenDownloadURL(web_contents);
} else {
installer()->StartInstalling(
- TabContents::FromWebContents(observer_->web_contents()));
+ TabContents::FromWebContents(web_contents));
}
return false;
}
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/plugins/plugin_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698