| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "ios/web/web_state/navigation_context_impl.h" | 5 #include "ios/web/web_state/navigation_context_impl.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 void NavigationContextImpl::SetIsErrorPage(bool is_error_page) { | 59 void NavigationContextImpl::SetIsErrorPage(bool is_error_page) { |
| 60 is_error_page_ = is_error_page; | 60 is_error_page_ = is_error_page; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void NavigationContextImpl::SetResponseHeaders( | 63 void NavigationContextImpl::SetResponseHeaders( |
| 64 const scoped_refptr<net::HttpResponseHeaders>& response_headers) { | 64 const scoped_refptr<net::HttpResponseHeaders>& response_headers) { |
| 65 response_headers_ = response_headers; | 65 response_headers_ = response_headers; |
| 66 } | 66 } |
| 67 | 67 |
| 68 int NavigationContextImpl::GetNavigationItemUniqueID() const { |
| 69 return navigation_item_unique_id_; |
| 70 } |
| 71 |
| 72 void NavigationContextImpl::SetNavigationItemUniqueID(int unique_id) { |
| 73 navigation_item_unique_id_ = unique_id; |
| 74 } |
| 75 |
| 68 NavigationContextImpl::NavigationContextImpl( | 76 NavigationContextImpl::NavigationContextImpl( |
| 69 WebState* web_state, | 77 WebState* web_state, |
| 70 const GURL& url, | 78 const GURL& url, |
| 71 bool is_same_document, | 79 bool is_same_document, |
| 72 bool is_error_page, | 80 bool is_error_page, |
| 73 const scoped_refptr<net::HttpResponseHeaders>& response_headers) | 81 const scoped_refptr<net::HttpResponseHeaders>& response_headers) |
| 74 : web_state_(web_state), | 82 : web_state_(web_state), |
| 75 url_(url), | 83 url_(url), |
| 76 is_same_document_(is_same_document), | 84 is_same_document_(is_same_document), |
| 77 is_error_page_(is_error_page), | 85 is_error_page_(is_error_page), |
| 78 response_headers_(response_headers) {} | 86 response_headers_(response_headers) {} |
| 79 | 87 |
| 80 NavigationContextImpl::~NavigationContextImpl() = default; | 88 NavigationContextImpl::~NavigationContextImpl() = default; |
| 81 | 89 |
| 82 } // namespace web | 90 } // namespace web |
| OLD | NEW |