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

Side by Side 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, 10 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h " 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 default: 722 default:
723 NOTREACHED(); 723 NOTREACHED();
724 } 724 }
725 } 725 }
726 726
727 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, 727 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label,
728 const gfx::Range& range, 728 const gfx::Range& range,
729 int event_flags) { 729 int event_flags) {
730 switch (label->id()) { 730 switch (label->id()) {
731 case STYLED_LABEL_SECURITY_DETAILS: 731 case STYLED_LABEL_SECURITY_DETAILS:
732 web_contents()->OpenURL(content::OpenURLParams( 732 // Shift+Click of this link launches the Certificate Viewer directly.
733 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), 733 if ((event_flags & ui::EF_SHIFT_DOWN) && certificate_ &&
734 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 734 anchor_widget()) {
735 false)); 735 presenter_->RecordWebsiteSettingsAction(
736 presenter_->RecordWebsiteSettingsAction( 736 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
737 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); 737 ShowCertificateViewer(web_contents(),
738 anchor_widget()->GetNativeWindow(),
739 certificate_.get());
740 } else {
741 // Otherwise, open the Connection Security Help topic.
742 web_contents()->OpenURL(content::OpenURLParams(
743 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
744 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
745 false));
746 presenter_->RecordWebsiteSettingsAction(
747 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
748 }
738 break; 749 break;
739 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 750 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
740 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 751 presenter_->OnRevokeSSLErrorBypassButtonPressed();
741 GetWidget()->Close(); 752 GetWidget()->Close();
742 break; 753 break;
743 default: 754 default:
744 NOTREACHED(); 755 NOTREACHED();
745 } 756 }
746 } 757 }
OLDNEW
« 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