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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 2676673002: Add a shortcut that opens Certificate Viewer from the Page Info flyout (Closed)
Patch Set: Detect Shift Click on Mac PageInfo Created 3 years, 11 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/ui/views/website_settings/website_settings_popup_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
index 2409e1656c13d7ca731e5ab532e3b465ca1e8a1d..1445454982ca28688154decbb8ba8d2581361637 100644
--- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
+++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
@@ -729,12 +729,23 @@ void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label,
int event_flags) {
switch (label->id()) {
case STYLED_LABEL_SECURITY_DETAILS:
- web_contents()->OpenURL(content::OpenURLParams(
- GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
- WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
- false));
- presenter_->RecordWebsiteSettingsAction(
- WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
+ // Shift+Click of this link launches the Certificate Viewer directly.
+ if ((event_flags & ui::EF_SHIFT_DOWN) && certificate_ &&
+ anchor_widget()) {
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
+ ShowCertificateViewer(web_contents(),
+ anchor_widget()->GetNativeWindow(),
+ certificate_.get());
+ } else {
+ // Otherwise, open the Connection Security Help topic.
+ web_contents()->OpenURL(content::OpenURLParams(
+ GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
+ WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
+ false));
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
+ }
break;
case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
presenter_->OnRevokeSSLErrorBypassButtonPressed();
« no previous file with comments | « chrome/browser/ui/views/website_settings/website_settings_popup_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698