| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 // Called when WKWebView URL has been changed. | 346 // Called when WKWebView URL has been changed. |
| 347 - (void)webViewURLDidChange; | 347 - (void)webViewURLDidChange; |
| 348 | 348 |
| 349 @end | 349 @end |
| 350 | 350 |
| 351 @implementation CRWWKWebViewWebController | 351 @implementation CRWWKWebViewWebController |
| 352 | 352 |
| 353 #pragma mark CRWWebController public methods | 353 #pragma mark CRWWebController public methods |
| 354 | 354 |
| 355 - (instancetype)initWithWebState:(std::unique_ptr<web::WebStateImpl>)webState { | 355 - (instancetype)initWithWebState:(web::WebStateImpl*)webState { |
| 356 DCHECK(webState); | 356 self = [super initWithWebState:webState]; |
| 357 web::BrowserState* browserState = webState->GetBrowserState(); | |
| 358 self = [super initWithWebState:std::move(webState)]; | |
| 359 if (self) { | 357 if (self) { |
| 358 DCHECK(webState); |
| 359 web::BrowserState* browserState = webState->GetBrowserState(); |
| 360 _certVerificationController.reset([[CRWCertVerificationController alloc] | 360 _certVerificationController.reset([[CRWCertVerificationController alloc] |
| 361 initWithBrowserState:browserState]); | 361 initWithBrowserState:browserState]); |
| 362 _certVerificationErrors.reset( | 362 _certVerificationErrors.reset( |
| 363 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); | 363 new CertVerificationErrorsCacheType(kMaxCertErrorsCount)); |
| 364 } | 364 } |
| 365 return self; | 365 return self; |
| 366 } | 366 } |
| 367 | 367 |
| 368 - (void)terminateNetworkActivity { | 368 - (void)terminateNetworkActivity { |
| 369 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); | 369 web::CertStore::GetInstance()->RemoveCertsForGroup(self.certGroupID); |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 runJavaScriptTextInputPanelWithPrompt:prompt | 1722 runJavaScriptTextInputPanelWithPrompt:prompt |
| 1723 defaultText:defaultText | 1723 defaultText:defaultText |
| 1724 requestURL:requestURL | 1724 requestURL:requestURL |
| 1725 completionHandler:completionHandler]; | 1725 completionHandler:completionHandler]; |
| 1726 } else if (completionHandler) { | 1726 } else if (completionHandler) { |
| 1727 completionHandler(nil); | 1727 completionHandler(nil); |
| 1728 } | 1728 } |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 @end | 1731 @end |
| OLD | NEW |