| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/certificate_viewer.h" | 11 #include "chrome/browser/certificate_viewer.h" |
| 12 #include "chrome/browser/infobars/infobar_service.h" | 12 #include "chrome/browser/infobars/infobar_service.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_dialogs.h" | 15 #include "chrome/browser/ui/browser_dialogs.h" |
| 17 #include "chrome/browser/ui/views/collected_cookies_views.h" | 16 #include "chrome/browser/ui/views/collected_cookies_views.h" |
| 18 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" | 17 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" |
| 19 #include "chrome/browser/ui/website_settings/website_settings.h" | 18 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 20 #include "chrome/browser/ui/website_settings/website_settings_utils.h" | 19 #include "chrome/browser/ui/website_settings/website_settings_utils.h" |
| 21 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 22 #include "components/content_settings/core/common/content_settings_types.h" | 21 #include "components/content_settings/core/common/content_settings_types.h" |
| 23 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/cert_store.h" | 23 #include "content/public/browser/cert_store.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 375 } |
| 377 | 376 |
| 378 void WebsiteSettingsPopupView::OnWidgetDestroying(views::Widget* widget) { | 377 void WebsiteSettingsPopupView::OnWidgetDestroying(views::Widget* widget) { |
| 379 is_popup_showing = false; | 378 is_popup_showing = false; |
| 380 presenter_->OnUIClosing(); | 379 presenter_->OnUIClosing(); |
| 381 } | 380 } |
| 382 | 381 |
| 383 void WebsiteSettingsPopupView::ButtonPressed(views::Button* button, | 382 void WebsiteSettingsPopupView::ButtonPressed(views::Button* button, |
| 384 const ui::Event& event) { | 383 const ui::Event& event) { |
| 385 if (button == reset_decisions_button_) { | 384 if (button == reset_decisions_button_) { |
| 386 ChromeSSLHostStateDelegate* delegate = | 385 presenter_->OnSSLDecisionsRevokeButtonPressed(); |
| 387 presenter_->chrome_ssl_host_state_delegate(); | |
| 388 DCHECK(delegate); | |
| 389 delegate->RevokeUserDecisionsHard(presenter_->site_url().host()); | |
| 390 GetWidget()->Close(); | 386 GetWidget()->Close(); |
| 391 } | 387 } |
| 392 } | 388 } |
| 393 | 389 |
| 394 void WebsiteSettingsPopupView::LinkClicked(views::Link* source, | 390 void WebsiteSettingsPopupView::LinkClicked(views::Link* source, |
| 395 int event_flags) { | 391 int event_flags) { |
| 396 if (source == cookie_dialog_link_) { | 392 if (source == cookie_dialog_link_) { |
| 397 // Count how often the Collected Cookies dialog is opened. | 393 // Count how often the Collected Cookies dialog is opened. |
| 398 content::RecordAction( | 394 content::RecordAction( |
| 399 base::UserMetricsAction("WebsiteSettings_CookiesDialogOpened")); | 395 base::UserMetricsAction("WebsiteSettings_CookiesDialogOpened")); |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 808 |
| 813 if (reset_decisions_button) { | 809 if (reset_decisions_button) { |
| 814 content_layout->StartRow(1, 0); | 810 content_layout->StartRow(1, 0); |
| 815 content_layout->AddView(reset_decisions_button); | 811 content_layout->AddView(reset_decisions_button); |
| 816 } | 812 } |
| 817 | 813 |
| 818 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, | 814 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, |
| 819 views::GridLayout::LEADING); | 815 views::GridLayout::LEADING); |
| 820 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); | 816 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); |
| 821 } | 817 } |
| OLD | NEW |