Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ | 5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ |
| 6 #define IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ | 6 #define IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #import "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "ios/web/navigation/navigation_item_facade_delegate.h" | 14 #include "ios/web/navigation/navigation_item_facade_delegate.h" |
| 15 #include "ios/web/public/favicon_status.h" | 15 #include "ios/web/public/favicon_status.h" |
| 16 #import "ios/web/public/navigation_item.h" | 16 #import "ios/web/public/navigation_item.h" |
| 17 #include "ios/web/public/referrer.h" | 17 #include "ios/web/public/referrer.h" |
| 18 #include "ios/web/public/ssl_status.h" | 18 #include "ios/web/public/ssl_status.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 namespace web { | 21 namespace web { |
| 22 | 22 |
| 23 class NavigationItemFacadeDelegate; | 23 class NavigationItemFacadeDelegate; |
| 24 class NavigationItemStorageBuilder; | |
| 24 | 25 |
| 25 // Implementation of NavigationItem. | 26 // Implementation of NavigationItem. |
| 26 class NavigationItemImpl : public web::NavigationItem { | 27 class NavigationItemImpl : public web::NavigationItem { |
| 27 public: | 28 public: |
| 28 // Creates a default NavigationItemImpl. | 29 // Creates a default NavigationItemImpl. |
| 29 NavigationItemImpl(); | 30 NavigationItemImpl(); |
| 30 ~NavigationItemImpl() override; | 31 ~NavigationItemImpl() override; |
| 31 | 32 |
| 32 // Since NavigationItemImpls own their facade delegates, there is no implicit | 33 // Since NavigationItemImpls own their facade delegates, there is no implicit |
| 33 // copy constructor (scoped_ptrs can't be copied), so one is defined here. | 34 // copy constructor (scoped_ptrs can't be copied), so one is defined here. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 bool is_overriding_user_agent_; | 135 bool is_overriding_user_agent_; |
| 135 base::scoped_nsobject<NSMutableDictionary> http_request_headers_; | 136 base::scoped_nsobject<NSMutableDictionary> http_request_headers_; |
| 136 | 137 |
| 137 base::scoped_nsobject<NSString> serialized_state_object_; | 138 base::scoped_nsobject<NSString> serialized_state_object_; |
| 138 bool is_created_from_push_state_; | 139 bool is_created_from_push_state_; |
| 139 bool has_state_been_replaced_; | 140 bool has_state_been_replaced_; |
| 140 bool is_created_from_hash_change_; | 141 bool is_created_from_hash_change_; |
| 141 bool should_skip_repost_form_confirmation_; | 142 bool should_skip_repost_form_confirmation_; |
| 142 base::scoped_nsobject<NSData> post_data_; | 143 base::scoped_nsobject<NSData> post_data_; |
| 143 | 144 |
| 145 // The NavigationManItemStorageBuilder functions require access to | |
| 146 // private variables of NavigationItemImpl. | |
| 147 friend NavigationItemStorageBuilder; | |
|
Eugene But (OOO till 7-30)
2017/01/31 22:12:26
nit: Do you want to move this to the top (before a
kkhorimoto
2017/02/03 00:36:09
Done.
| |
| 148 | |
| 144 // Whether the item, while loading, was created for a renderer-initiated | 149 // Whether the item, while loading, was created for a renderer-initiated |
| 145 // navigation. This dictates whether the URL should be displayed before the | 150 // navigation. This dictates whether the URL should be displayed before the |
| 146 // navigation commits. It is cleared in |ResetForCommit| and not persisted. | 151 // navigation commits. It is cleared in |ResetForCommit| and not persisted. |
| 147 bool is_renderer_initiated_; | 152 bool is_renderer_initiated_; |
| 148 | 153 |
| 149 // Whether the navigation contains unsafe resources. | 154 // Whether the navigation contains unsafe resources. |
| 150 bool is_unsafe_; | 155 bool is_unsafe_; |
| 151 | 156 |
| 152 // This is a cached version of the result of GetTitleForDisplay. When the URL, | 157 // This is a cached version of the result of GetTitleForDisplay. When the URL, |
| 153 // virtual URL, or title is set, this should be cleared to force a refresh. | 158 // virtual URL, or title is set, this should be cleared to force a refresh. |
| 154 mutable base::string16 cached_display_title_; | 159 mutable base::string16 cached_display_title_; |
| 155 | 160 |
| 156 // Weak pointer to the facade delegate. | 161 // Weak pointer to the facade delegate. |
| 157 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate_; | 162 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate_; |
| 158 | 163 |
| 159 // Copy and assignment is explicitly allowed for this class. | 164 // Copy and assignment is explicitly allowed for this class. |
| 160 }; | 165 }; |
| 161 | 166 |
| 162 } // namespace web | 167 } // namespace web |
| 163 | 168 |
| 164 #endif // IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ | 169 #endif // IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ |
| OLD | NEW |