| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro
ller.h" | 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro
ller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #import <AppKit/AppKit.h> | 9 #import <AppKit/AppKit.h> |
| 10 | 10 |
| 11 #include "base/mac/bind_objc_block.h" | 11 #include "base/mac/bind_objc_block.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
| 14 #import "chrome/browser/certificate_viewer.h" | 14 #import "chrome/browser/certificate_viewer.h" |
| 15 #include "chrome/browser/infobars/infobar_service.h" | 15 #include "chrome/browser/infobars/infobar_service.h" |
| 16 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | |
| 17 #import "chrome/browser/ui/browser_dialogs.h" | 16 #import "chrome/browser/ui/browser_dialogs.h" |
| 18 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 17 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 19 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 18 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 20 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 19 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 21 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 20 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 22 #import "chrome/browser/ui/cocoa/website_settings/permission_selector_button.h" | 21 #import "chrome/browser/ui/cocoa/website_settings/permission_selector_button.h" |
| 23 #include "chrome/browser/ui/website_settings/permission_menu_model.h" | 22 #include "chrome/browser/ui/website_settings/permission_menu_model.h" |
| 24 #include "chrome/browser/ui/website_settings/website_settings_utils.h" | 23 #include "chrome/browser/ui/website_settings/website_settings_utils.h" |
| 25 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 26 #include "content/public/browser/cert_store.h" | 25 #include "content/public/browser/cert_store.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 512 |
| 514 // Handler for the link button to show certificate information. | 513 // Handler for the link button to show certificate information. |
| 515 - (void)showCertificateInfo:(id)sender { | 514 - (void)showCertificateInfo:(id)sender { |
| 516 DCHECK(certificateId_); | 515 DCHECK(certificateId_); |
| 517 ShowCertificateViewerByID(webContents_, [self parentWindow], certificateId_); | 516 ShowCertificateViewerByID(webContents_, [self parentWindow], certificateId_); |
| 518 } | 517 } |
| 519 | 518 |
| 520 // Handler for the link button to revoke user certificate decisions. | 519 // Handler for the link button to revoke user certificate decisions. |
| 521 - (void)resetCertificateDecisions:(id)sender { | 520 - (void)resetCertificateDecisions:(id)sender { |
| 522 DCHECK(resetDecisionsButton_); | 521 DCHECK(resetDecisionsButton_); |
| 523 ChromeSSLHostStateDelegate* delegate = | 522 presenter_->OnSSLDecisionsRevokeButtonPressed(); |
| 524 presenter_->chrome_ssl_host_state_delegate(); | |
| 525 DCHECK(delegate); | |
| 526 delegate->RevokeUserDecisionsHard(presenter_->site_url().host()); | |
| 527 [self close]; | 523 [self close]; |
| 528 } | 524 } |
| 529 | 525 |
| 530 // Handler for the link to show help information about the connection tab. | 526 // Handler for the link to show help information about the connection tab. |
| 531 - (void)showHelpPage:(id)sender { | 527 - (void)showHelpPage:(id)sender { |
| 532 webContents_->OpenURL(content::OpenURLParams( | 528 webContents_->OpenURL(content::OpenURLParams( |
| 533 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), | 529 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), |
| 534 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); | 530 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); |
| 535 } | 531 } |
| 536 | 532 |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 [bubble_controller_ setPermissionInfo:permission_info_list]; | 1220 [bubble_controller_ setPermissionInfo:permission_info_list]; |
| 1225 } | 1221 } |
| 1226 | 1222 |
| 1227 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { | 1223 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { |
| 1228 [bubble_controller_ setFirstVisit:first_visit]; | 1224 [bubble_controller_ setFirstVisit:first_visit]; |
| 1229 } | 1225 } |
| 1230 | 1226 |
| 1231 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { | 1227 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { |
| 1232 [bubble_controller_ setSelectedTab:tab_id]; | 1228 [bubble_controller_ setSelectedTab:tab_id]; |
| 1233 } | 1229 } |
| OLD | NEW |