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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 // Typically on PAGE_TRANSITION_CLIENT_REDIRECT. | 1702 // Typically on PAGE_TRANSITION_CLIENT_REDIRECT. |
1703 [[self sessionController] updatePendingEntry:requestURL]; | 1703 [[self sessionController] updatePendingEntry:requestURL]; |
1704 } else { | 1704 } else { |
1705 // A new session history entry needs to be created. | 1705 // A new session history entry needs to be created. |
1706 [[self sessionController] addPendingEntry:requestURL | 1706 [[self sessionController] addPendingEntry:requestURL |
1707 referrer:referrer | 1707 referrer:referrer |
1708 transition:transition | 1708 transition:transition |
1709 rendererInitiated:YES]; | 1709 rendererInitiated:YES]; |
1710 } | 1710 } |
1711 _webStateImpl->SetIsLoading(true); | 1711 _webStateImpl->SetIsLoading(true); |
1712 [_delegate webDidAddPendingURL]; | |
1713 _webStateImpl->OnProvisionalNavigationStarted(requestURL); | 1712 _webStateImpl->OnProvisionalNavigationStarted(requestURL); |
1714 } | 1713 } |
1715 | 1714 |
1716 - (void)updateHTML5HistoryState { | 1715 - (void)updateHTML5HistoryState { |
1717 web::NavigationItemImpl* currentItem = | 1716 web::NavigationItemImpl* currentItem = |
1718 static_cast<web::NavigationItemImpl*>([self currentNavItem]); | 1717 static_cast<web::NavigationItemImpl*>([self currentNavItem]); |
1719 if (!currentItem) | 1718 if (!currentItem) |
1720 return; | 1719 return; |
1721 | 1720 |
1722 // Same-document navigations must trigger a popState event. | 1721 // Same-document navigations must trigger a popState event. |
(...skipping 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5768 } | 5767 } |
5769 | 5768 |
5770 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5769 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
5771 } | 5770 } |
5772 | 5771 |
5773 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5772 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
5774 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5773 return [action.request valueForHTTPHeaderField:@"Referer"]; |
5775 } | 5774 } |
5776 | 5775 |
5777 @end | 5776 @end |
OLD | NEW |