| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // FrameNavigationEntry. Subframes are only added to the tree if the | 145 // FrameNavigationEntry. Subframes are only added to the tree if the |
| 146 // --site-per-process flag is passed. | 146 // --site-per-process flag is passed. |
| 147 TreeNode* root_node() const { | 147 TreeNode* root_node() const { |
| 148 return frame_tree_.get(); | 148 return frame_tree_.get(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Finds the TreeNode associated with |frame_tree_node_id| to add or update | 151 // Finds the TreeNode associated with |frame_tree_node_id| to add or update |
| 152 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none | 152 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none |
| 153 // exists, or else the existing one (which might be shared with other | 153 // exists, or else the existing one (which might be shared with other |
| 154 // NavigationEntries) is updated with the given parameters. | 154 // NavigationEntries) is updated with the given parameters. |
| 155 void AddOrUpdateFrameEntry(int64 frame_tree_node_id, | 155 void AddOrUpdateFrameEntry(int frame_tree_node_id, |
| 156 SiteInstanceImpl* site_instance, | 156 SiteInstanceImpl* site_instance, |
| 157 const GURL& url, | 157 const GURL& url, |
| 158 const Referrer& referrer); | 158 const Referrer& referrer); |
| 159 | 159 |
| 160 void set_unique_id(int unique_id) { | 160 void set_unique_id(int unique_id) { |
| 161 unique_id_ = unique_id; | 161 unique_id_ = unique_id; |
| 162 } | 162 } |
| 163 | 163 |
| 164 // The SiteInstance represents which pages must share processes. This is a | 164 // The SiteInstance represents which pages must share processes. This is a |
| 165 // reference counted pointer to a shared SiteInstance. | 165 // reference counted pointer to a shared SiteInstance. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // to false after commit. | 274 // to false after commit. |
| 275 bool should_clear_history_list() const { | 275 bool should_clear_history_list() const { |
| 276 return should_clear_history_list_; | 276 return should_clear_history_list_; |
| 277 } | 277 } |
| 278 void set_should_clear_history_list(bool should_clear_history_list) { | 278 void set_should_clear_history_list(bool should_clear_history_list) { |
| 279 should_clear_history_list_ = should_clear_history_list; | 279 should_clear_history_list_ = should_clear_history_list; |
| 280 } | 280 } |
| 281 | 281 |
| 282 // Indicates which FrameTreeNode to navigate. Currently only used if the | 282 // Indicates which FrameTreeNode to navigate. Currently only used if the |
| 283 // --site-per-process flag is passed. | 283 // --site-per-process flag is passed. |
| 284 int64 frame_tree_node_id() const { | 284 int frame_tree_node_id() const { |
| 285 return frame_tree_node_id_; | 285 return frame_tree_node_id_; |
| 286 } | 286 } |
| 287 void set_frame_tree_node_id(int64 frame_tree_node_id) { | 287 void set_frame_tree_node_id(int frame_tree_node_id) { |
| 288 frame_tree_node_id_ = frame_tree_node_id; | 288 frame_tree_node_id_ = frame_tree_node_id; |
| 289 } | 289 } |
| 290 | 290 |
| 291 // Returns the history URL for a data URL to use in Blink. | 291 // Returns the history URL for a data URL to use in Blink. |
| 292 GURL GetHistoryURLForDataURL() const; | 292 GURL GetHistoryURLForDataURL() const; |
| 293 | 293 |
| 294 #if defined(OS_ANDROID) | 294 #if defined(OS_ANDROID) |
| 295 base::TimeTicks intent_received_timestamp() const { | 295 base::TimeTicks intent_received_timestamp() const { |
| 296 return intent_received_timestamp_; | 296 return intent_received_timestamp_; |
| 297 } | 297 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 411 |
| 412 // Set when this entry should be able to access local file:// resources. This | 412 // Set when this entry should be able to access local file:// resources. This |
| 413 // value is not needed after the entry commits and is not persisted. | 413 // value is not needed after the entry commits and is not persisted. |
| 414 bool can_load_local_resources_; | 414 bool can_load_local_resources_; |
| 415 | 415 |
| 416 // If not -1, this indicates which FrameTreeNode to navigate. This field is | 416 // If not -1, this indicates which FrameTreeNode to navigate. This field is |
| 417 // not persisted because it is experimental and only used when the | 417 // not persisted because it is experimental and only used when the |
| 418 // --site-per-process flag is passed. It is cleared in |ResetForCommit| | 418 // --site-per-process flag is passed. It is cleared in |ResetForCommit| |
| 419 // because we only use it while the navigation is pending. | 419 // because we only use it while the navigation is pending. |
| 420 // TODO(creis): Move this to FrameNavigationEntry. | 420 // TODO(creis): Move this to FrameNavigationEntry. |
| 421 int64 frame_tree_node_id_; | 421 int frame_tree_node_id_; |
| 422 | 422 |
| 423 #if defined(OS_ANDROID) | 423 #if defined(OS_ANDROID) |
| 424 // The time at which Chrome received the Android Intent that triggered this | 424 // The time at which Chrome received the Android Intent that triggered this |
| 425 // URL load operation. Reset at commit and not persisted. | 425 // URL load operation. Reset at commit and not persisted. |
| 426 base::TimeTicks intent_received_timestamp_; | 426 base::TimeTicks intent_received_timestamp_; |
| 427 #endif | 427 #endif |
| 428 | 428 |
| 429 // Used to store extra data to support browser features. This member is not | 429 // Used to store extra data to support browser features. This member is not |
| 430 // persisted, unless specific data is taken out/put back in at save/restore | 430 // persisted, unless specific data is taken out/put back in at save/restore |
| 431 // time (see TabNavigation for an example of this). | 431 // time (see TabNavigation for an example of this). |
| 432 std::map<std::string, base::string16> extra_data_; | 432 std::map<std::string, base::string16> extra_data_; |
| 433 | 433 |
| 434 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 434 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
| 435 }; | 435 }; |
| 436 | 436 |
| 437 } // namespace content | 437 } // namespace content |
| 438 | 438 |
| 439 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 439 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |