| 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_view/public/cwv_web_view.h" | 5 #import "ios/web_view/public/cwv_web_view.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #import "base/ios/weak_nsobject.h" | 10 #import "base/ios/weak_nsobject.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 if (_webState->GetNavigationManager()) | 125 if (_webState->GetNavigationManager()) |
| 126 _webState->GetNavigationManager()->GoBack(); | 126 _webState->GetNavigationManager()->GoBack(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 - (void)goForward { | 129 - (void)goForward { |
| 130 if (_webState->GetNavigationManager()) | 130 if (_webState->GetNavigationManager()) |
| 131 _webState->GetNavigationManager()->GoForward(); | 131 _webState->GetNavigationManager()->GoForward(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 - (void)reload { | 134 - (void)reload { |
| 135 _webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, true); | 135 // |check_for_repost| is false because CWVWebView does not support repost form |
| 136 // dialogs. |
| 137 _webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, |
| 138 false /* check_for_repost */); |
| 136 } | 139 } |
| 137 | 140 |
| 138 - (void)stopLoading { | 141 - (void)stopLoading { |
| 139 _webState->Stop(); | 142 _webState->Stop(); |
| 140 } | 143 } |
| 141 | 144 |
| 142 - (void)loadRequest:(NSURLRequest*)request { | 145 - (void)loadRequest:(NSURLRequest*)request { |
| 143 DCHECK_EQ(nil, request.HTTPBodyStream) | 146 DCHECK_EQ(nil, request.HTTPBodyStream) |
| 144 << "request.HTTPBodyStream is not supported."; | 147 << "request.HTTPBodyStream is not supported."; |
| 145 | 148 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 [_UIDelegate webViewDidClose:self]; | 262 [_UIDelegate webViewDidClose:self]; |
| 260 } | 263 } |
| 261 } | 264 } |
| 262 | 265 |
| 263 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState: | 266 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState: |
| 264 (web::WebState*)webState { | 267 (web::WebState*)webState { |
| 265 return _javaScriptDialogPresenter.get(); | 268 return _javaScriptDialogPresenter.get(); |
| 266 } | 269 } |
| 267 | 270 |
| 268 @end | 271 @end |
| OLD | NEW |