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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 _certVerificationController; | 183 _certVerificationController; |
184 | 184 |
185 // Updates SSLStatus for current navigation item. | 185 // Updates SSLStatus for current navigation item. |
186 base::scoped_nsobject<CRWSSLStatusUpdater> _SSLStatusUpdater; | 186 base::scoped_nsobject<CRWSSLStatusUpdater> _SSLStatusUpdater; |
187 | 187 |
188 // CertVerification errors which happened inside | 188 // CertVerification errors which happened inside |
189 // |webView:didReceiveAuthenticationChallenge:completionHandler:|. | 189 // |webView:didReceiveAuthenticationChallenge:completionHandler:|. |
190 // Key is leaf-cert/host pair. This storage is used to carry calculated | 190 // Key is leaf-cert/host pair. This storage is used to carry calculated |
191 // cert status from |didReceiveAuthenticationChallenge:| to | 191 // cert status from |didReceiveAuthenticationChallenge:| to |
192 // |didFailProvisionalNavigation:| delegate method. | 192 // |didFailProvisionalNavigation:| delegate method. |
193 scoped_ptr<CertVerificationErrorsCacheType> _certVerificationErrors; | 193 std::unique_ptr<CertVerificationErrorsCacheType> _certVerificationErrors; |
194 | 194 |
195 // YES if the user has interacted with the content area since the last URL | 195 // YES if the user has interacted with the content area since the last URL |
196 // change. | 196 // change. |
197 BOOL _interactionRegisteredSinceLastURLChange; | 197 BOOL _interactionRegisteredSinceLastURLChange; |
198 | 198 |
199 // YES if the web process backing _wkWebView is believed to currently be dead. | 199 // YES if the web process backing _wkWebView is believed to currently be dead. |
200 BOOL _webProcessIsDead; | 200 BOOL _webProcessIsDead; |
201 | 201 |
202 // The WKNavigation for the most recent load request. | 202 // The WKNavigation for the most recent load request. |
203 base::scoped_nsobject<WKNavigation> _latestWKNavigation; | 203 base::scoped_nsobject<WKNavigation> _latestWKNavigation; |
(...skipping 141 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:(scoped_ptr<web::WebStateImpl>)webState { | 355 - (instancetype)initWithWebState:(std::unique_ptr<web::WebStateImpl>)webState { |
356 DCHECK(webState); | 356 DCHECK(webState); |
357 web::BrowserState* browserState = webState->GetBrowserState(); | 357 web::BrowserState* browserState = webState->GetBrowserState(); |
358 self = [super initWithWebState:std::move(webState)]; | 358 self = [super initWithWebState:std::move(webState)]; |
359 if (self) { | 359 if (self) { |
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; |
(...skipping 1356 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 |