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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "components/sessions/sessions_export.h" | 16 #include "components/sessions/sessions_export.h" |
| 17 #include "content/public/common/page_state.h" |
17 #include "content/public/common/page_transition_types.h" | 18 #include "content/public/common/page_transition_types.h" |
18 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
20 | 21 |
21 class Pickle; | 22 class Pickle; |
22 class PickleIterator; | 23 class PickleIterator; |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 class BrowserContext; | 26 class BrowserContext; |
26 class NavigationEntry; | 27 class NavigationEntry; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 90 |
90 // The index in the NavigationController. This SerializedNavigationEntry is | 91 // The index in the NavigationController. This SerializedNavigationEntry is |
91 // valid only when the index is non-negative. | 92 // valid only when the index is non-negative. |
92 int index() const { return index_; } | 93 int index() const { return index_; } |
93 void set_index(int index) { index_ = index; } | 94 void set_index(int index) { index_ = index; } |
94 | 95 |
95 // Accessors for some fields taken from NavigationEntry. | 96 // Accessors for some fields taken from NavigationEntry. |
96 int unique_id() const { return unique_id_; } | 97 int unique_id() const { return unique_id_; } |
97 const GURL& virtual_url() const { return virtual_url_; } | 98 const GURL& virtual_url() const { return virtual_url_; } |
98 const string16& title() const { return title_; } | 99 const string16& title() const { return title_; } |
99 const std::string& content_state() const { return content_state_; } | 100 const content::PageState& page_state() const { return page_state_; } |
100 const string16& search_terms() const { return search_terms_; } | 101 const string16& search_terms() const { return search_terms_; } |
101 const GURL& favicon_url() const { return favicon_url_; } | 102 const GURL& favicon_url() const { return favicon_url_; } |
102 const content::Referrer& referrer() const { return referrer_; } | 103 const content::Referrer& referrer() const { return referrer_; } |
103 content::PageTransition transition_type() const { | 104 content::PageTransition transition_type() const { |
104 return transition_type_; | 105 return transition_type_; |
105 } | 106 } |
106 bool has_post_data() const { return has_post_data_; } | 107 bool has_post_data() const { return has_post_data_; } |
107 int64 post_id() const { return post_id_; } | 108 int64 post_id() const { return post_id_; } |
108 const GURL& original_request_url() const { return original_request_url_; } | 109 const GURL& original_request_url() const { return original_request_url_; } |
109 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } | 110 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } |
(...skipping 22 matching lines...) Expand all Loading... |
132 friend class SerializedNavigationEntryTestHelper; | 133 friend class SerializedNavigationEntryTestHelper; |
133 | 134 |
134 // Index in the NavigationController. | 135 // Index in the NavigationController. |
135 int index_; | 136 int index_; |
136 | 137 |
137 // Member variables corresponding to NavigationEntry fields. | 138 // Member variables corresponding to NavigationEntry fields. |
138 int unique_id_; | 139 int unique_id_; |
139 content::Referrer referrer_; | 140 content::Referrer referrer_; |
140 GURL virtual_url_; | 141 GURL virtual_url_; |
141 string16 title_; | 142 string16 title_; |
142 std::string content_state_; | 143 content::PageState page_state_; |
143 content::PageTransition transition_type_; | 144 content::PageTransition transition_type_; |
144 bool has_post_data_; | 145 bool has_post_data_; |
145 int64 post_id_; | 146 int64 post_id_; |
146 GURL original_request_url_; | 147 GURL original_request_url_; |
147 bool is_overriding_user_agent_; | 148 bool is_overriding_user_agent_; |
148 base::Time timestamp_; | 149 base::Time timestamp_; |
149 string16 search_terms_; | 150 string16 search_terms_; |
150 GURL favicon_url_; | 151 GURL favicon_url_; |
151 | 152 |
152 // Additional information. | 153 // Additional information. |
153 BlockedState blocked_state_; | 154 BlockedState blocked_state_; |
154 std::set<std::string> content_pack_categories_; | 155 std::set<std::string> content_pack_categories_; |
155 }; | 156 }; |
156 | 157 |
157 } // namespace sessions | 158 } // namespace sessions |
158 | 159 |
159 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 160 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
OLD | NEW |