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

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

Issue 1361253002: Separate the URL of an infobar link with clicking on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting Created 5 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/pepper_broker_infobar_delegate.cc ('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/plugins/chrome_plugin_service_filter.cc
diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.cc b/chrome/browser/plugins/chrome_plugin_service_filter.cc
index 35b5beea026d7a639e643f1efbc0224f1f86709b..34070015a4c2185381c07278f10f9294e3c81b5f 100644
--- a/chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ b/chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -80,6 +80,7 @@ class NPAPIRemovalInfoBarDelegate : public ConfirmInfoBarDelegate {
base::string16 GetMessageText() const override;
int GetButtons() const override;
base::string16 GetLinkText() const override;
+ GURL GetLinkURL() const override;
bool LinkClicked(WindowOpenDisposition disposition) override;
base::string16 plugin_name_;
@@ -165,14 +166,14 @@ base::string16 NPAPIRemovalInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
+GURL NPAPIRemovalInfoBarDelegate::GetLinkURL() const {
+ return GURL(kLearnMoreUrl);
+}
+
bool NPAPIRemovalInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
- InfoBarService::WebContentsFromInfoBar(infobar())
- ->OpenURL(content::OpenURLParams(
- GURL(kLearnMoreUrl), content::Referrer(),
- (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
- ui::PAGE_TRANSITION_LINK, false));
content::RecordAction(UserMetricsAction("NPAPIRemovalInfobar.LearnMore"));
+ ConfirmInfoBarDelegate::LinkClicked(disposition);
return true;
}
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698