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/restore_type.h" |
23 #include "content/public/common/page_state.h" | 24 #include "content/public/common/page_state.h" |
24 #include "content/public/common/ssl_status.h" | 25 #include "content/public/common/ssl_status.h" |
25 | 26 |
26 namespace content { | 27 namespace content { |
27 class ResourceRequestBodyImpl; | 28 class ResourceRequestBodyImpl; |
28 struct CommonNavigationParams; | 29 struct CommonNavigationParams; |
29 struct RequestNavigationParams; | 30 struct RequestNavigationParams; |
30 struct StartNavigationParams; | 31 struct StartNavigationParams; |
31 | 32 |
32 class CONTENT_EXPORT NavigationEntryImpl | 33 class CONTENT_EXPORT NavigationEntryImpl |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 is_renderer_initiated_ = is_renderer_initiated; | 295 is_renderer_initiated_ = is_renderer_initiated; |
295 } | 296 } |
296 bool is_renderer_initiated() const { | 297 bool is_renderer_initiated() const { |
297 return is_renderer_initiated_; | 298 return is_renderer_initiated_; |
298 } | 299 } |
299 | 300 |
300 void set_user_typed_url(const GURL& user_typed_url) { | 301 void set_user_typed_url(const GURL& user_typed_url) { |
301 user_typed_url_ = user_typed_url; | 302 user_typed_url_ = user_typed_url; |
302 } | 303 } |
303 | 304 |
304 // Enumerations of the possible restore types. | |
305 enum RestoreType { | |
306 // Restore from the previous session. | |
307 RESTORE_LAST_SESSION_EXITED_CLEANLY, | |
308 RESTORE_LAST_SESSION_CRASHED, | |
309 | |
310 // The entry has been restored from the current session. This is used when | |
311 // the user issues 'reopen closed tab'. | |
312 RESTORE_CURRENT_SESSION, | |
313 | |
314 // The entry was not restored. | |
315 RESTORE_NONE | |
316 }; | |
317 | |
318 // The RestoreType for this entry. This is set if the entry was retored. This | 305 // The RestoreType for this entry. This is set if the entry was retored. This |
319 // is set to RESTORE_NONE once the entry is loaded. | 306 // is set to RESTORE_NONE once the entry is loaded. |
320 void set_restore_type(RestoreType type) { | 307 void set_restore_type(RestoreType type) { |
321 restore_type_ = type; | 308 restore_type_ = type; |
322 } | 309 } |
323 RestoreType restore_type() const { | 310 RestoreType restore_type() const { |
324 return restore_type_; | 311 return restore_type_; |
325 } | 312 } |
326 | 313 |
327 void set_transferred_global_request_id( | 314 void set_transferred_global_request_id( |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // persisted, unless specific data is taken out/put back in at save/restore | 509 // persisted, unless specific data is taken out/put back in at save/restore |
523 // time (see TabNavigation for an example of this). | 510 // time (see TabNavigation for an example of this). |
524 std::map<std::string, base::string16> extra_data_; | 511 std::map<std::string, base::string16> extra_data_; |
525 | 512 |
526 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 513 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
527 }; | 514 }; |
528 | 515 |
529 } // namespace content | 516 } // namespace content |
530 | 517 |
531 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 518 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |