| 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 "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 // Called when WKWebView URL has been changed. | 180 // Called when WKWebView URL has been changed. |
| 181 - (void)webViewURLDidChange; | 181 - (void)webViewURLDidChange; |
| 182 | 182 |
| 183 @end | 183 @end |
| 184 | 184 |
| 185 @implementation CRWWKWebViewWebController | 185 @implementation CRWWKWebViewWebController |
| 186 | 186 |
| 187 #pragma mark CRWWebController public methods | 187 #pragma mark CRWWebController public methods |
| 188 | 188 |
| 189 - (instancetype)initWithWebState:(std::unique_ptr<web::WebStateImpl>)webState { | 189 - (instancetype)initWithWebState:(web::WebStateImpl*)webState { |
| 190 DCHECK(webState); | 190 self = [super initWithWebState:webState]; |
| 191 web::BrowserState* browserState = webState->GetBrowserState(); | |
| 192 self = [super initWithWebState:std::move(webState)]; | |
| 193 if (self) { | 191 if (self) { |
| 192 DCHECK(webState); |
| 193 web::BrowserState* browserState = webState->GetBrowserState(); |
| 194 _certVerificationController.reset([[CRWCertVerificationController alloc] | 194 _certVerificationController.reset([[CRWCertVerificationController alloc] |
| 195 initWithBrowserState:browserState]); | 195 initWithBrowserState:browserState]); |
| 196 _certVerificationErrors.reset( | 196 _certVerificationErrors.reset( |
| 197 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); | 197 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); |
| 198 } | 198 } |
| 199 return self; | 199 return self; |
| 200 } | 200 } |
| 201 | 201 |
| 202 - (void)terminateNetworkActivity { | 202 - (void)terminateNetworkActivity { |
| 203 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); | 203 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 - (void)SSLStatusUpdater:(CRWSSLStatusUpdater*)SSLStatusUpdater | 1016 - (void)SSLStatusUpdater:(CRWSSLStatusUpdater*)SSLStatusUpdater |
| 1017 didChangeSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem { | 1017 didChangeSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem { |
| 1018 web::NavigationItem* currentNavigationItem = | 1018 web::NavigationItem* currentNavigationItem = |
| 1019 self.webState->GetNavigationManager()->GetLastCommittedItem(); | 1019 self.webState->GetNavigationManager()->GetLastCommittedItem(); |
| 1020 if (navigationItem == currentNavigationItem) { | 1020 if (navigationItem == currentNavigationItem) { |
| 1021 [self didUpdateSSLStatusForCurrentNavigationItem]; | 1021 [self didUpdateSSLStatusForCurrentNavigationItem]; |
| 1022 } | 1022 } |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 @end | 1025 @end |
| OLD | NEW |