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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "content/browser/frame_host/frame_navigation_entry.h" | 15 #include "content/browser/frame_host/frame_navigation_entry.h" |
16 #include "content/browser/frame_host/frame_tree_node.h" | 16 #include "content/browser/frame_host/frame_tree_node.h" |
17 #include "content/browser/site_instance_impl.h" | 17 #include "content/browser/site_instance_impl.h" |
18 #include "content/common/frame_message_enums.h" | 18 #include "content/common/frame_message_enums.h" |
19 #include "content/common/resource_request_body_impl.h" | 19 #include "content/common/resource_request_body_impl.h" |
20 #include "content/public/browser/favicon_status.h" | 20 #include "content/public/browser/favicon_status.h" |
21 #include "content/public/browser/global_request_id.h" | 21 #include "content/public/browser/global_request_id.h" |
22 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
| 23 #include "content/public/browser/reload_type.h" |
23 #include "content/public/browser/restore_type.h" | 24 #include "content/public/browser/restore_type.h" |
24 #include "content/public/browser/ssl_status.h" | 25 #include "content/public/browser/ssl_status.h" |
25 #include "content/public/common/page_state.h" | 26 #include "content/public/common/page_state.h" |
26 | 27 |
27 namespace content { | 28 namespace content { |
28 class ResourceRequestBodyImpl; | 29 class ResourceRequestBodyImpl; |
29 struct CommonNavigationParams; | 30 struct CommonNavigationParams; |
30 struct RequestNavigationParams; | 31 struct RequestNavigationParams; |
31 struct StartNavigationParams; | 32 struct StartNavigationParams; |
32 | 33 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 307 } |
307 bool is_renderer_initiated() const { | 308 bool is_renderer_initiated() const { |
308 return is_renderer_initiated_; | 309 return is_renderer_initiated_; |
309 } | 310 } |
310 | 311 |
311 void set_user_typed_url(const GURL& user_typed_url) { | 312 void set_user_typed_url(const GURL& user_typed_url) { |
312 user_typed_url_ = user_typed_url; | 313 user_typed_url_ = user_typed_url; |
313 } | 314 } |
314 | 315 |
315 // The RestoreType for this entry. This is set if the entry was retored. This | 316 // The RestoreType for this entry. This is set if the entry was retored. This |
316 // is set to RESTORE_NONE once the entry is loaded. | 317 // is set to RestoreType::NONE once the entry is loaded. |
317 void set_restore_type(RestoreType type) { | 318 void set_restore_type(RestoreType type) { |
318 restore_type_ = type; | 319 restore_type_ = type; |
319 } | 320 } |
320 RestoreType restore_type() const { | 321 RestoreType restore_type() const { |
321 return restore_type_; | 322 return restore_type_; |
322 } | 323 } |
323 | 324 |
| 325 // The ReloadType for this entry. This is set when a reload is requested. |
| 326 // This is set to ReloadType::NONE if the entry isn't for a reload, or once |
| 327 // the entry is loaded. |
| 328 void set_reload_type(ReloadType type) { reload_type_ = type; } |
| 329 ReloadType reload_type() const { return reload_type_; } |
| 330 |
324 void set_transferred_global_request_id( | 331 void set_transferred_global_request_id( |
325 const GlobalRequestID& transferred_global_request_id) { | 332 const GlobalRequestID& transferred_global_request_id) { |
326 transferred_global_request_id_ = transferred_global_request_id; | 333 transferred_global_request_id_ = transferred_global_request_id; |
327 } | 334 } |
328 | 335 |
329 GlobalRequestID transferred_global_request_id() const { | 336 GlobalRequestID transferred_global_request_id() const { |
330 return transferred_global_request_id_; | 337 return transferred_global_request_id_; |
331 } | 338 } |
332 | 339 |
333 // Whether this (pending) navigation needs to replace current entry. | 340 // Whether this (pending) navigation needs to replace current entry. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 515 |
509 #if defined(OS_ANDROID) | 516 #if defined(OS_ANDROID) |
510 // The time at which Chrome received the Android Intent that triggered this | 517 // The time at which Chrome received the Android Intent that triggered this |
511 // URL load operation. Reset at commit and not persisted. | 518 // URL load operation. Reset at commit and not persisted. |
512 base::TimeTicks intent_received_timestamp_; | 519 base::TimeTicks intent_received_timestamp_; |
513 | 520 |
514 // Whether the URL load carries a user gesture. | 521 // Whether the URL load carries a user gesture. |
515 bool has_user_gesture_; | 522 bool has_user_gesture_; |
516 #endif | 523 #endif |
517 | 524 |
| 525 // Used to store ReloadType for the entry. This is ReloadType::NONE for |
| 526 // non-reload navigations. Reset at commit and not persisted. |
| 527 ReloadType reload_type_; |
| 528 |
518 // Used to store extra data to support browser features. This member is not | 529 // Used to store extra data to support browser features. This member is not |
519 // persisted, unless specific data is taken out/put back in at save/restore | 530 // persisted, unless specific data is taken out/put back in at save/restore |
520 // time (see TabNavigation for an example of this). | 531 // time (see TabNavigation for an example of this). |
521 std::map<std::string, base::string16> extra_data_; | 532 std::map<std::string, base::string16> extra_data_; |
522 | 533 |
523 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 534 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
524 }; | 535 }; |
525 | 536 |
526 } // namespace content | 537 } // namespace content |
527 | 538 |
528 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 539 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |