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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 WebsiteSettings::WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED); 802 WebsiteSettings::WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED);
803 803
804 new CollectedCookiesViews(web_contents()); 804 new CollectedCookiesViews(web_contents());
805 } else if (source == site_settings_link_) { 805 } else if (source == site_settings_link_) {
806 // TODO(palmer): This opens the general Content Settings pane, which is OK 806 // TODO(palmer): This opens the general Content Settings pane, which is OK
807 // for now. But on Android, it opens a page specific to a given origin that 807 // for now. But on Android, it opens a page specific to a given origin that
808 // shows all of the settings for that origin. If/when that's available on 808 // shows all of the settings for that origin. If/when that's available on
809 // desktop we should link to that here, too. 809 // desktop we should link to that here, too.
810 web_contents()->OpenURL(content::OpenURLParams( 810 web_contents()->OpenURL(content::OpenURLParams(
811 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(), 811 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(),
812 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); 812 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
813 false));
813 presenter_->RecordWebsiteSettingsAction( 814 presenter_->RecordWebsiteSettingsAction(
814 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED); 815 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED);
815 } else { 816 } else {
816 NOTREACHED(); 817 NOTREACHED();
817 } 818 }
818 } 819 }
819 820
820 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, 821 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label,
821 const gfx::Range& range, 822 const gfx::Range& range,
822 int event_flags) { 823 int event_flags) {
823 presenter_->RecordWebsiteSettingsAction( 824 presenter_->RecordWebsiteSettingsAction(
824 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); 825 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED);
825 826
826 if (is_devtools_disabled_) { 827 if (is_devtools_disabled_) {
827 DCHECK_NE(cert_id_, 0); 828 DCHECK_NE(cert_id_, 0);
828 gfx::NativeWindow parent = 829 gfx::NativeWindow parent =
829 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; 830 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr;
830 presenter_->RecordWebsiteSettingsAction( 831 presenter_->RecordWebsiteSettingsAction(
831 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); 832 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
832 ShowCertificateViewerByID(web_contents(), parent, cert_id_); 833 ShowCertificateViewerByID(web_contents(), parent, cert_id_);
833 } else { 834 } else {
834 DevToolsWindow::OpenDevToolsWindow( 835 DevToolsWindow::OpenDevToolsWindow(
835 web_contents(), DevToolsToggleAction::ShowSecurityPanel()); 836 web_contents(), DevToolsToggleAction::ShowSecurityPanel());
836 } 837 }
837 } 838 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698