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 COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 5 #ifndef COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
6 #define COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 6 #define COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "components/sessions/sessions_export.h" | 15 #include "components/sessions/sessions_export.h" |
| 16 #include "content/public/common/page_state.h" |
16 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
17 #include "content/public/common/referrer.h" | 18 #include "content/public/common/referrer.h" |
18 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
19 | 20 |
20 class Pickle; | 21 class Pickle; |
21 class PickleIterator; | 22 class PickleIterator; |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 class BrowserContext; | 25 class BrowserContext; |
25 class NavigationEntry; | 26 class NavigationEntry; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 83 |
83 // The index in the NavigationController. This SerializedNavigationEntry is | 84 // The index in the NavigationController. This SerializedNavigationEntry is |
84 // valid only when the index is non-negative. | 85 // valid only when the index is non-negative. |
85 int index() const { return index_; } | 86 int index() const { return index_; } |
86 void set_index(int index) { index_ = index; } | 87 void set_index(int index) { index_ = index; } |
87 | 88 |
88 // Accessors for some fields taken from NavigationEntry. | 89 // Accessors for some fields taken from NavigationEntry. |
89 int unique_id() const { return unique_id_; } | 90 int unique_id() const { return unique_id_; } |
90 const GURL& virtual_url() const { return virtual_url_; } | 91 const GURL& virtual_url() const { return virtual_url_; } |
91 const string16& title() const { return title_; } | 92 const string16& title() const { return title_; } |
92 const std::string& content_state() const { return content_state_; } | 93 const content::PageState& page_state() const { return page_state_; } |
93 const string16& search_terms() const { return search_terms_; } | 94 const string16& search_terms() const { return search_terms_; } |
94 const GURL& favicon_url() const { return favicon_url_; } | 95 const GURL& favicon_url() const { return favicon_url_; } |
95 const content::Referrer& referrer() const { return referrer_; } | 96 const content::Referrer& referrer() const { return referrer_; } |
96 content::PageTransition transition_type() const { | 97 content::PageTransition transition_type() const { |
97 return transition_type_; | 98 return transition_type_; |
98 } | 99 } |
99 bool has_post_data() const { return has_post_data_; } | 100 bool has_post_data() const { return has_post_data_; } |
100 int64 post_id() const { return post_id_; } | 101 int64 post_id() const { return post_id_; } |
101 const GURL& original_request_url() const { return original_request_url_; } | 102 const GURL& original_request_url() const { return original_request_url_; } |
102 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } | 103 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } |
(...skipping 10 matching lines...) Expand all Loading... |
113 friend class SerializedNavigationEntryTestHelper; | 114 friend class SerializedNavigationEntryTestHelper; |
114 | 115 |
115 // Index in the NavigationController. | 116 // Index in the NavigationController. |
116 int index_; | 117 int index_; |
117 | 118 |
118 // Member variables corresponding to NavigationEntry fields. | 119 // Member variables corresponding to NavigationEntry fields. |
119 int unique_id_; | 120 int unique_id_; |
120 content::Referrer referrer_; | 121 content::Referrer referrer_; |
121 GURL virtual_url_; | 122 GURL virtual_url_; |
122 string16 title_; | 123 string16 title_; |
123 std::string content_state_; | 124 content::PageState page_state_; |
124 content::PageTransition transition_type_; | 125 content::PageTransition transition_type_; |
125 bool has_post_data_; | 126 bool has_post_data_; |
126 int64 post_id_; | 127 int64 post_id_; |
127 GURL original_request_url_; | 128 GURL original_request_url_; |
128 bool is_overriding_user_agent_; | 129 bool is_overriding_user_agent_; |
129 base::Time timestamp_; | 130 base::Time timestamp_; |
130 string16 search_terms_; | 131 string16 search_terms_; |
131 GURL favicon_url_; | 132 GURL favicon_url_; |
132 }; | 133 }; |
133 | 134 |
134 } // namespace sessions | 135 } // namespace sessions |
135 | 136 |
136 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 137 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
OLD | NEW |