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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

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 | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index 31b9d3c240e563cc295f4abb0f0d254758d22be0..71a5dc133dfa9cca80ebbb9981c31ac356748acf 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -414,12 +414,23 @@ bool IsInternalURL(const GURL& url) {
- (void)openConnectionHelp:(id)sender {
DCHECK(webContents_);
DCHECK(presenter_);
- presenter_->RecordWebsiteSettingsAction(
- WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
- webContents_->OpenURL(content::OpenURLParams(
- GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
- WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
- false));
+
+ // Shift+Click of this link launches the Certificate Viewer directly.
+ BOOL shiftKeyDown = ([[NSApp currentEvent] modifierFlags] &
+ (NSShiftKeyMask | NSAlphaShiftKeyMask)) != 0;
+ if (certificate_ && shiftKeyDown) {
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
+ [self showCertificateInfo:sender];
+ } else {
+ // Otherwise, open the Connection Security Help topic.
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
+ webContents_->OpenURL(content::OpenURLParams(
+ GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
+ WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
+ false));
+ }
}
// Handler for the link button to show certificate information.
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698