OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |