| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PUBLIC_RENDERER_NAVIGATION_STATE_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ | 6 #define CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/public/common/page_transition_types.h" | 9 #include "content/public/common/page_transition_types.h" |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 bool request_committed() const { return request_committed_; } | 50 bool request_committed() const { return request_committed_; } |
| 51 void set_request_committed(bool value) { request_committed_ = value; } | 51 void set_request_committed(bool value) { request_committed_ = value; } |
| 52 | 52 |
| 53 // True if this navigation was not initiated via WebFrame::LoadRequest. | 53 // True if this navigation was not initiated via WebFrame::LoadRequest. |
| 54 bool is_content_initiated() const { return is_content_initiated_; } | 54 bool is_content_initiated() const { return is_content_initiated_; } |
| 55 | 55 |
| 56 // True iff the frame's navigation was within the same page. | 56 // True iff the frame's navigation was within the same page. |
| 57 void set_was_within_same_page(bool value) { was_within_same_page_ = value; } | 57 void set_was_within_same_page(bool value) { was_within_same_page_ = value; } |
| 58 bool was_within_same_page() const { return was_within_same_page_; } | 58 bool was_within_same_page() const { return was_within_same_page_; } |
| 59 | 59 |
| 60 // transferred_request_child_id and transferred_request_request_id identify |
| 61 // a request that has been created before the navigation is being transferred |
| 62 // to a new renderer. This is used to recycle the old request once the new |
| 63 // renderer tries to pick up the navigation of the old one. |
| 64 void set_transferred_request_child_id(int value) { |
| 65 transferred_request_child_id_ = value; |
| 66 } |
| 67 int transferred_request_child_id() const { |
| 68 return transferred_request_child_id_; |
| 69 } |
| 70 void set_transferred_request_request_id(int value) { |
| 71 transferred_request_request_id_ = value; |
| 72 } |
| 73 int transferred_request_request_id() const { |
| 74 return transferred_request_request_id_; |
| 75 } |
| 76 |
| 60 private: | 77 private: |
| 61 NavigationState(content::PageTransition transition_type, | 78 NavigationState(content::PageTransition transition_type, |
| 62 bool is_content_initiated, | 79 bool is_content_initiated, |
| 63 int32 pending_page_id, | 80 int32 pending_page_id, |
| 64 int pending_history_list_offset); | 81 int pending_history_list_offset); |
| 65 | 82 |
| 66 content::PageTransition transition_type_; | 83 content::PageTransition transition_type_; |
| 67 bool request_committed_; | 84 bool request_committed_; |
| 68 bool is_content_initiated_; | 85 bool is_content_initiated_; |
| 69 int32 pending_page_id_; | 86 int32 pending_page_id_; |
| 70 int pending_history_list_offset_; | 87 int pending_history_list_offset_; |
| 71 | 88 |
| 72 bool was_within_same_page_; | 89 bool was_within_same_page_; |
| 90 int transferred_request_child_id_; |
| 91 int transferred_request_request_id_; |
| 73 | 92 |
| 74 DISALLOW_COPY_AND_ASSIGN(NavigationState); | 93 DISALLOW_COPY_AND_ASSIGN(NavigationState); |
| 75 }; | 94 }; |
| 76 | 95 |
| 77 #endif // CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ | 96 #endif // CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ |
| 78 | 97 |
| 79 } // namespace content | 98 } // namespace content |
| OLD | NEW |