| 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> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // Accessors for the delegate used to drive the navigation entry facade. | 36 // Accessors for the delegate used to drive the navigation entry facade. |
| 37 // NOTE: to minimize facade synchronization code, NavigationItems take | 37 // NOTE: to minimize facade synchronization code, NavigationItems take |
| 38 // ownership of their facade delegates. | 38 // ownership of their facade delegates. |
| 39 void SetFacadeDelegate( | 39 void SetFacadeDelegate( |
| 40 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate); | 40 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate); |
| 41 NavigationItemFacadeDelegate* GetFacadeDelegate() const; | 41 NavigationItemFacadeDelegate* GetFacadeDelegate() const; |
| 42 | 42 |
| 43 // NavigationItem implementation: | 43 // NavigationItem implementation: |
| 44 int GetUniqueID() const override; | 44 int GetUniqueID() const override; |
| 45 void SetOriginalRequestURL(const GURL& url) override; |
| 46 const GURL& GetOriginalRequestURL() const override; |
| 45 void SetURL(const GURL& url) override; | 47 void SetURL(const GURL& url) override; |
| 46 const GURL& GetURL() const override; | 48 const GURL& GetURL() const override; |
| 47 void SetReferrer(const web::Referrer& referrer) override; | 49 void SetReferrer(const web::Referrer& referrer) override; |
| 48 const web::Referrer& GetReferrer() const override; | 50 const web::Referrer& GetReferrer() const override; |
| 49 void SetVirtualURL(const GURL& url) override; | 51 void SetVirtualURL(const GURL& url) override; |
| 50 const GURL& GetVirtualURL() const override; | 52 const GURL& GetVirtualURL() const override; |
| 51 void SetTitle(const base::string16& title) override; | 53 void SetTitle(const base::string16& title) override; |
| 52 const base::string16& GetTitle() const override; | 54 const base::string16& GetTitle() const override; |
| 53 void SetPageDisplayState(const PageDisplayState& display_state) override; | 55 void SetPageDisplayState(const PageDisplayState& display_state) override; |
| 54 const PageDisplayState& GetPageDisplayState() const override; | 56 const PageDisplayState& GetPageDisplayState() const override; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 114 |
| 113 // Whether this (pending) navigation is renderer-initiated. Resets to false | 115 // Whether this (pending) navigation is renderer-initiated. Resets to false |
| 114 // for all types of navigations after commit. | 116 // for all types of navigations after commit. |
| 115 void set_is_renderer_initiated(bool is_renderer_initiated) { | 117 void set_is_renderer_initiated(bool is_renderer_initiated) { |
| 116 is_renderer_initiated_ = is_renderer_initiated; | 118 is_renderer_initiated_ = is_renderer_initiated; |
| 117 } | 119 } |
| 118 bool is_renderer_initiated() const { return is_renderer_initiated_; } | 120 bool is_renderer_initiated() const { return is_renderer_initiated_; } |
| 119 | 121 |
| 120 private: | 122 private: |
| 121 int unique_id_; | 123 int unique_id_; |
| 124 GURL original_request_url_; |
| 122 GURL url_; | 125 GURL url_; |
| 123 Referrer referrer_; | 126 Referrer referrer_; |
| 124 GURL virtual_url_; | 127 GURL virtual_url_; |
| 125 base::string16 title_; | 128 base::string16 title_; |
| 126 PageDisplayState page_display_state_; | 129 PageDisplayState page_display_state_; |
| 127 ui::PageTransition transition_type_; | 130 ui::PageTransition transition_type_; |
| 128 FaviconStatus favicon_; | 131 FaviconStatus favicon_; |
| 129 SSLStatus ssl_; | 132 SSLStatus ssl_; |
| 130 base::Time timestamp_; | 133 base::Time timestamp_; |
| 131 bool is_overriding_user_agent_; | 134 bool is_overriding_user_agent_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 152 | 155 |
| 153 // Weak pointer to the facade delegate. | 156 // Weak pointer to the facade delegate. |
| 154 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate_; | 157 std::unique_ptr<NavigationItemFacadeDelegate> facade_delegate_; |
| 155 | 158 |
| 156 // Copy and assignment is explicitly allowed for this class. | 159 // Copy and assignment is explicitly allowed for this class. |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } // namespace web | 162 } // namespace web |
| 160 | 163 |
| 161 #endif // IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ | 164 #endif // IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_ |
| OLD | NEW |