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 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 | 1480 |
1481 - (void)replaceStateWithPageURL:(const GURL&)pageUrl | 1481 - (void)replaceStateWithPageURL:(const GURL&)pageUrl |
1482 stateObject:(NSString*)stateObject { | 1482 stateObject:(NSString*)stateObject { |
1483 [[self sessionController] updateCurrentEntryWithURL:pageUrl | 1483 [[self sessionController] updateCurrentEntryWithURL:pageUrl |
1484 stateObject:stateObject]; | 1484 stateObject:stateObject]; |
1485 [self didUpdateHistoryStateWithPageURL:pageUrl]; | 1485 [self didUpdateHistoryStateWithPageURL:pageUrl]; |
1486 } | 1486 } |
1487 | 1487 |
1488 - (void)setDocumentURL:(const GURL&)newURL { | 1488 - (void)setDocumentURL:(const GURL&)newURL { |
1489 if (newURL != _documentURL) { | 1489 if (newURL != _documentURL) { |
1490 CHECK(newURL.is_valid()); | |
1491 _documentURL = newURL; | 1490 _documentURL = newURL; |
1492 _interactionRegisteredSinceLastURLChange = NO; | 1491 _interactionRegisteredSinceLastURLChange = NO; |
1493 } | 1492 } |
1494 } | 1493 } |
1495 | 1494 |
1496 - (BOOL)isCurrentNavigationItemPOST { | 1495 - (BOOL)isCurrentNavigationItemPOST { |
1497 // |_pendingNavigationInfo| will be nil if the decidePolicy* delegate methods | 1496 // |_pendingNavigationInfo| will be nil if the decidePolicy* delegate methods |
1498 // were not called. | 1497 // were not called. |
1499 NSString* HTTPMethod = | 1498 NSString* HTTPMethod = |
1500 _pendingNavigationInfo | 1499 _pendingNavigationInfo |
(...skipping 4128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5629 } | 5628 } |
5630 | 5629 |
5631 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5630 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
5632 } | 5631 } |
5633 | 5632 |
5634 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5633 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
5635 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5634 return [action.request valueForHTTPHeaderField:@"Referer"]; |
5636 } | 5635 } |
5637 | 5636 |
5638 @end | 5637 @end |
OLD | NEW |