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_DOCUMENT_STATE_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ |
6 #define CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ | 6 #define CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" |
16 | 16 |
| 17 namespace webkit { |
| 18 namespace forms { |
| 19 struct PasswordForm; |
| 20 } |
| 21 } |
| 22 |
17 namespace webkit_glue { | 23 namespace webkit_glue { |
18 struct PasswordForm; | |
19 class AltErrorPageResourceFetcher; | 24 class AltErrorPageResourceFetcher; |
20 } | 25 } |
21 | 26 |
22 namespace content { | 27 namespace content { |
23 | 28 |
24 class NavigationState; | 29 class NavigationState; |
25 | 30 |
26 // The RenderView stores an instance of this class in the "extra data" of each | 31 // The RenderView stores an instance of this class in the "extra data" of each |
27 // WebDataSource (see RenderView::DidCreateDataSource). | 32 // WebDataSource (see RenderView::DidCreateDataSource). |
28 class DocumentState : public WebKit::WebDataSource::ExtraData { | 33 class DocumentState : public WebKit::WebDataSource::ExtraData { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 160 |
156 const GURL& searchable_form_url() const { return searchable_form_url_; } | 161 const GURL& searchable_form_url() const { return searchable_form_url_; } |
157 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } | 162 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } |
158 const std::string& searchable_form_encoding() const { | 163 const std::string& searchable_form_encoding() const { |
159 return searchable_form_encoding_; | 164 return searchable_form_encoding_; |
160 } | 165 } |
161 void set_searchable_form_encoding(const std::string& encoding) { | 166 void set_searchable_form_encoding(const std::string& encoding) { |
162 searchable_form_encoding_ = encoding; | 167 searchable_form_encoding_ = encoding; |
163 } | 168 } |
164 | 169 |
165 webkit_glue::PasswordForm* password_form_data() const { | 170 webkit::forms::PasswordForm* password_form_data() const { |
166 return password_form_data_.get(); | 171 return password_form_data_.get(); |
167 } | 172 } |
168 void set_password_form_data(webkit_glue::PasswordForm* data); | 173 void set_password_form_data(webkit::forms::PasswordForm* data); |
169 | 174 |
170 const std::string& security_info() const { return security_info_; } | 175 const std::string& security_info() const { return security_info_; } |
171 void set_security_info(const std::string& security_info) { | 176 void set_security_info(const std::string& security_info) { |
172 security_info_ = security_info; | 177 security_info_ = security_info; |
173 } | 178 } |
174 | 179 |
175 // True if an error page should be used, if the http status code also | 180 // True if an error page should be used, if the http status code also |
176 // indicates an error. | 181 // indicates an error. |
177 bool use_error_page() const { return use_error_page_; } | 182 bool use_error_page() const { return use_error_page_; } |
178 void set_use_error_page(bool use_error_page) { | 183 void set_use_error_page(bool use_error_page) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 bool load_histograms_recorded_; | 236 bool load_histograms_recorded_; |
232 bool web_timing_histograms_recorded_; | 237 bool web_timing_histograms_recorded_; |
233 int http_status_code_; | 238 int http_status_code_; |
234 bool was_fetched_via_spdy_; | 239 bool was_fetched_via_spdy_; |
235 bool was_npn_negotiated_; | 240 bool was_npn_negotiated_; |
236 bool was_alternate_protocol_available_; | 241 bool was_alternate_protocol_available_; |
237 bool was_fetched_via_proxy_; | 242 bool was_fetched_via_proxy_; |
238 | 243 |
239 GURL searchable_form_url_; | 244 GURL searchable_form_url_; |
240 std::string searchable_form_encoding_; | 245 std::string searchable_form_encoding_; |
241 scoped_ptr<webkit_glue::PasswordForm> password_form_data_; | 246 scoped_ptr<webkit::forms::PasswordForm> password_form_data_; |
242 std::string security_info_; | 247 std::string security_info_; |
243 | 248 |
244 bool use_error_page_; | 249 bool use_error_page_; |
245 | 250 |
246 // A prefetcher is a page that contains link rel=prefetch elements. | 251 // A prefetcher is a page that contains link rel=prefetch elements. |
247 bool was_prefetcher_; | 252 bool was_prefetcher_; |
248 bool was_referred_by_prefetcher_; | 253 bool was_referred_by_prefetcher_; |
249 | 254 |
250 LoadType load_type_; | 255 LoadType load_type_; |
251 | 256 |
252 bool cache_policy_override_set_; | 257 bool cache_policy_override_set_; |
253 WebKit::WebURLRequest::CachePolicy cache_policy_override_; | 258 WebKit::WebURLRequest::CachePolicy cache_policy_override_; |
254 | 259 |
255 scoped_ptr<webkit_glue::AltErrorPageResourceFetcher> alt_error_page_fetcher_; | 260 scoped_ptr<webkit_glue::AltErrorPageResourceFetcher> alt_error_page_fetcher_; |
256 | 261 |
257 scoped_ptr<NavigationState> navigation_state_; | 262 scoped_ptr<NavigationState> navigation_state_; |
258 }; | 263 }; |
259 | 264 |
260 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ | 265 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ |
261 | 266 |
262 } // namespace content | 267 } // namespace content |
OLD | NEW |