| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 // Called when WKWebView URL has been changed. | 283 // Called when WKWebView URL has been changed. |
| 284 - (void)webViewURLDidChange; | 284 - (void)webViewURLDidChange; |
| 285 | 285 |
| 286 @end | 286 @end |
| 287 | 287 |
| 288 @implementation CRWWKWebViewWebController | 288 @implementation CRWWKWebViewWebController |
| 289 | 289 |
| 290 #pragma mark CRWWebController public methods | 290 #pragma mark CRWWebController public methods |
| 291 | 291 |
| 292 - (instancetype)initWithWebState:(std::unique_ptr<web::WebStateImpl>)webState { | 292 - (instancetype)initWithWebState:(web::WebStateImpl*)webState { |
| 293 DCHECK(webState); | 293 self = [super initWithWebState:webState]; |
| 294 web::BrowserState* browserState = webState->GetBrowserState(); | |
| 295 self = [super initWithWebState:std::move(webState)]; | |
| 296 if (self) { | 294 if (self) { |
| 295 DCHECK(webState); |
| 296 web::BrowserState* browserState = webState->GetBrowserState(); |
| 297 _certVerificationController.reset([[CRWCertVerificationController alloc] | 297 _certVerificationController.reset([[CRWCertVerificationController alloc] |
| 298 initWithBrowserState:browserState]); | 298 initWithBrowserState:browserState]); |
| 299 _certVerificationErrors.reset( | 299 _certVerificationErrors.reset( |
| 300 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); | 300 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); |
| 301 } | 301 } |
| 302 return self; | 302 return self; |
| 303 } | 303 } |
| 304 | 304 |
| 305 - (void)terminateNetworkActivity { | 305 - (void)terminateNetworkActivity { |
| 306 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); | 306 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 runJavaScriptTextInputPanelWithPrompt:prompt | 1563 runJavaScriptTextInputPanelWithPrompt:prompt |
| 1564 defaultText:defaultText | 1564 defaultText:defaultText |
| 1565 requestURL:requestURL | 1565 requestURL:requestURL |
| 1566 completionHandler:completionHandler]; | 1566 completionHandler:completionHandler]; |
| 1567 } else if (completionHandler) { | 1567 } else if (completionHandler) { |
| 1568 completionHandler(nil); | 1568 completionHandler(nil); |
| 1569 } | 1569 } |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 @end | 1572 @end |
| OLD | NEW |