| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_web_controller.h" |
| 6 | 6 |
| 7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
| 8 | 8 |
| 9 #import <objc/runtime.h> | 9 #import <objc/runtime.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 _webStateImpl->OnTitleChanged(); | 1389 _webStateImpl->OnTitleChanged(); |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 - (BOOL)isCurrentNavigationItemPOST { | 1392 - (BOOL)isCurrentNavigationItemPOST { |
| 1393 // |_pendingNavigationInfo| will be nil if the decidePolicy* delegate methods | 1393 // |_pendingNavigationInfo| will be nil if the decidePolicy* delegate methods |
| 1394 // were not called. | 1394 // were not called. |
| 1395 NSString* HTTPMethod = | 1395 NSString* HTTPMethod = |
| 1396 _pendingNavigationInfo | 1396 _pendingNavigationInfo |
| 1397 ? [_pendingNavigationInfo HTTPMethod] | 1397 ? [_pendingNavigationInfo HTTPMethod] |
| 1398 : [self currentBackForwardListItemHolder]->http_method(); | 1398 : [self currentBackForwardListItemHolder]->http_method(); |
| 1399 return [HTTPMethod isEqual:@"POST"]; | 1399 return [HTTPMethod isEqual:@"POST"] || self.currentNavItem->HasPostData(); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 - (BOOL)isCurrentNavigationBackForward { | 1402 - (BOOL)isCurrentNavigationBackForward { |
| 1403 if (!self.currentNavItem) | 1403 if (!self.currentNavItem) |
| 1404 return NO; | 1404 return NO; |
| 1405 WKNavigationType currentNavigationType = | 1405 WKNavigationType currentNavigationType = |
| 1406 [self currentBackForwardListItemHolder]->navigation_type(); | 1406 [self currentBackForwardListItemHolder]->navigation_type(); |
| 1407 return currentNavigationType == WKNavigationTypeBackForward; | 1407 return currentNavigationType == WKNavigationTypeBackForward; |
| 1408 } | 1408 } |
| 1409 | 1409 |
| (...skipping 3824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5234 - (NSUInteger)observerCount { | 5234 - (NSUInteger)observerCount { |
| 5235 DCHECK_EQ(_observerBridges.size(), [_observers count]); | 5235 DCHECK_EQ(_observerBridges.size(), [_observers count]); |
| 5236 return [_observers count]; | 5236 return [_observers count]; |
| 5237 } | 5237 } |
| 5238 | 5238 |
| 5239 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { | 5239 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { |
| 5240 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; | 5240 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; |
| 5241 } | 5241 } |
| 5242 | 5242 |
| 5243 @end | 5243 @end |
| OLD | NEW |