| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void ResetForCommit(); | 114 void ResetForCommit(); |
| 114 | 115 |
| 115 // Whether this (pending) navigation is renderer-initiated. Resets to false | 116 // Whether this (pending) navigation is renderer-initiated. Resets to false |
| 116 // for all types of navigations after commit. | 117 // for all types of navigations after commit. |
| 117 void set_is_renderer_initiated(bool is_renderer_initiated) { | 118 void set_is_renderer_initiated(bool is_renderer_initiated) { |
| 118 is_renderer_initiated_ = is_renderer_initiated; | 119 is_renderer_initiated_ = is_renderer_initiated; |
| 119 } | 120 } |
| 120 bool is_renderer_initiated() const { return is_renderer_initiated_; } | 121 bool is_renderer_initiated() const { return is_renderer_initiated_; } |
| 121 | 122 |
| 122 private: | 123 private: |
| 124 // The NavigationManItemStorageBuilder functions require access to |
| 125 // private variables of NavigationItemImpl. |
| 126 friend NavigationItemStorageBuilder; |
| 127 |
| 123 int unique_id_; | 128 int unique_id_; |
| 124 GURL original_request_url_; | 129 GURL original_request_url_; |
| 125 GURL url_; | 130 GURL url_; |
| 126 Referrer referrer_; | 131 Referrer referrer_; |
| 127 GURL virtual_url_; | 132 GURL virtual_url_; |
| 128 base::string16 title_; | 133 base::string16 title_; |
| 129 PageDisplayState page_display_state_; | 134 PageDisplayState page_display_state_; |
| 130 ui::PageTransition transition_type_; | 135 ui::PageTransition transition_type_; |
| 131 FaviconStatus favicon_; | 136 FaviconStatus favicon_; |
| 132 SSLStatus ssl_; | 137 SSLStatus ssl_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 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 |