Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.h

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: trybots ran with PS8, but one more safe change is added here Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/navigation_type.h"
Charlie Reis 2016/09/09 05:41:05 I don't think we need this, do we?
Takashi Toyoshima 2016/09/09 07:31:30 Oh, right. We only need restore_type.h here.
24 #include "content/public/browser/restore_type.h"
23 #include "content/public/common/page_state.h" 25 #include "content/public/common/page_state.h"
24 #include "content/public/common/ssl_status.h" 26 #include "content/public/common/ssl_status.h"
25 27
26 namespace content { 28 namespace content {
27 class ResourceRequestBodyImpl; 29 class ResourceRequestBodyImpl;
28 struct CommonNavigationParams; 30 struct CommonNavigationParams;
29 struct RequestNavigationParams; 31 struct RequestNavigationParams;
30 struct StartNavigationParams; 32 struct StartNavigationParams;
31 33
32 class CONTENT_EXPORT NavigationEntryImpl 34 class CONTENT_EXPORT NavigationEntryImpl
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 is_renderer_initiated_ = is_renderer_initiated; 296 is_renderer_initiated_ = is_renderer_initiated;
295 } 297 }
296 bool is_renderer_initiated() const { 298 bool is_renderer_initiated() const {
297 return is_renderer_initiated_; 299 return is_renderer_initiated_;
298 } 300 }
299 301
300 void set_user_typed_url(const GURL& user_typed_url) { 302 void set_user_typed_url(const GURL& user_typed_url) {
301 user_typed_url_ = user_typed_url; 303 user_typed_url_ = user_typed_url;
302 } 304 }
303 305
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 306 // 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. 307 // is set to RESTORE_NONE once the entry is loaded.
320 void set_restore_type(RestoreType type) { 308 void set_restore_type(RestoreType type) {
321 restore_type_ = type; 309 restore_type_ = type;
322 } 310 }
323 RestoreType restore_type() const { 311 RestoreType restore_type() const {
324 return restore_type_; 312 return restore_type_;
325 } 313 }
326 314
327 void set_transferred_global_request_id( 315 void set_transferred_global_request_id(
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // persisted, unless specific data is taken out/put back in at save/restore 510 // persisted, unless specific data is taken out/put back in at save/restore
523 // time (see TabNavigation for an example of this). 511 // time (see TabNavigation for an example of this).
524 std::map<std::string, base::string16> extra_data_; 512 std::map<std::string, base::string16> extra_data_;
525 513
526 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); 514 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl);
527 }; 515 };
528 516
529 } // namespace content 517 } // namespace content
530 518
531 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 519 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698