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 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1982 [self currentSessionEntry].navigationItemImpl; | 1982 [self currentSessionEntry].navigationItemImpl; |
1983 DCHECK(addedItem); | 1983 DCHECK(addedItem); |
1984 if (params.extra_headers) | 1984 if (params.extra_headers) |
1985 addedItem->AddHttpRequestHeaders(params.extra_headers); | 1985 addedItem->AddHttpRequestHeaders(params.extra_headers); |
1986 if (params.post_data) { | 1986 if (params.post_data) { |
1987 DCHECK([addedItem->GetHttpRequestHeaders() objectForKey:@"Content-Type"]) | 1987 DCHECK([addedItem->GetHttpRequestHeaders() objectForKey:@"Content-Type"]) |
1988 << "Post data should have an associated content type"; | 1988 << "Post data should have an associated content type"; |
1989 addedItem->SetPostData(params.post_data); | 1989 addedItem->SetPostData(params.post_data); |
1990 addedItem->SetShouldSkipResubmitDataConfirmation(true); | 1990 addedItem->SetShouldSkipResubmitDataConfirmation(true); |
1991 } | 1991 } |
| 1992 addedItem->extra_data_.reset([originalParams.extra_data retain]); |
1992 } | 1993 } |
1993 | 1994 |
1994 [_delegate webDidUpdateSessionForLoadWithParams:params | 1995 [_delegate webDidUpdateSessionForLoadWithParams:params |
1995 wasInitialNavigation:initialNavigation]; | 1996 wasInitialNavigation:initialNavigation]; |
1996 | 1997 |
1997 [self loadCurrentURL]; | 1998 [self loadCurrentURL]; |
1998 } | 1999 } |
1999 | 2000 |
2000 - (void)loadCurrentURL { | 2001 - (void)loadCurrentURL { |
2001 // If the content view doesn't exist, the tab has either been evicted, or | 2002 // If the content view doesn't exist, the tab has either been evicted, or |
(...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5625 } | 5626 } |
5626 | 5627 |
5627 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5628 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
5628 } | 5629 } |
5629 | 5630 |
5630 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5631 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
5631 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5632 return [action.request valueForHTTPHeaderField:@"Referer"]; |
5632 } | 5633 } |
5633 | 5634 |
5634 @end | 5635 @end |
OLD | NEW |