| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_NAVIGATION_STATE_H_ | 5 #ifndef CHROME_RENDERER_NAVIGATION_STATE_H_ |
| 6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ | 6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 void set_postpone_loading_data(bool postpone_loading_data) { | 214 void set_postpone_loading_data(bool postpone_loading_data) { |
| 215 postpone_loading_data_ = postpone_loading_data; | 215 postpone_loading_data_ = postpone_loading_data; |
| 216 } | 216 } |
| 217 | 217 |
| 218 const std::string& postponed_data() const { return postponed_data_; } | 218 const std::string& postponed_data() const { return postponed_data_; } |
| 219 void clear_postponed_data() { postponed_data_.clear(); } | 219 void clear_postponed_data() { postponed_data_.clear(); } |
| 220 void append_postponed_data(const char* data, size_t data_len) { | 220 void append_postponed_data(const char* data, size_t data_len) { |
| 221 postponed_data_.append(data, data_len); | 221 postponed_data_.append(data, data_len); |
| 222 } | 222 } |
| 223 | 223 |
| 224 bool is_prerendering() const; | |
| 225 void set_is_prerendering(bool is_prerendering); | |
| 226 | |
| 227 bool was_started_as_prerender() const; | 224 bool was_started_as_prerender() const; |
| 228 void set_was_started_as_prerender(bool was_started_as_prerender); | 225 void set_was_started_as_prerender(bool was_started_as_prerender); |
| 229 | 226 |
| 230 int http_status_code() const { return http_status_code_; } | 227 int http_status_code() const { return http_status_code_; } |
| 231 void set_http_status_code(int http_status_code) { | 228 void set_http_status_code(int http_status_code) { |
| 232 http_status_code_ = http_status_code; | 229 http_status_code_ = http_status_code; |
| 233 } | 230 } |
| 234 | 231 |
| 235 // Sets the cache policy. The cache policy is only used if explicitly set and | 232 // Sets the cache policy. The cache policy is only used if explicitly set and |
| 236 // by default is not set. You can mark a NavigationState as not having a cache | 233 // by default is not set. You can mark a NavigationState as not having a cache |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 int32 pending_page_id_; | 309 int32 pending_page_id_; |
| 313 int pending_history_list_offset_; | 310 int pending_history_list_offset_; |
| 314 GURL searchable_form_url_; | 311 GURL searchable_form_url_; |
| 315 std::string searchable_form_encoding_; | 312 std::string searchable_form_encoding_; |
| 316 scoped_ptr<webkit_glue::PasswordForm> password_form_data_; | 313 scoped_ptr<webkit_glue::PasswordForm> password_form_data_; |
| 317 scoped_ptr<webkit_glue::AltErrorPageResourceFetcher> alt_error_page_fetcher_; | 314 scoped_ptr<webkit_glue::AltErrorPageResourceFetcher> alt_error_page_fetcher_; |
| 318 std::string security_info_; | 315 std::string security_info_; |
| 319 bool postpone_loading_data_; | 316 bool postpone_loading_data_; |
| 320 std::string postponed_data_; | 317 std::string postponed_data_; |
| 321 | 318 |
| 322 // True if page is being prerendered. False once prerendered page is | |
| 323 // displayed. Preserved across redirects. Only set for the main frame's | |
| 324 // data source. | |
| 325 bool is_prerendering_; | |
| 326 | |
| 327 // True if a page load started as a prerender. Preserved across redirects. | 319 // True if a page load started as a prerender. Preserved across redirects. |
| 328 bool was_started_as_prerender_; | 320 bool was_started_as_prerender_; |
| 329 | 321 |
| 330 bool cache_policy_override_set_; | 322 bool cache_policy_override_set_; |
| 331 WebKit::WebURLRequest::CachePolicy cache_policy_override_; | 323 WebKit::WebURLRequest::CachePolicy cache_policy_override_; |
| 332 | 324 |
| 333 scoped_ptr<UserScriptIdleScheduler> user_script_idle_scheduler_; | 325 scoped_ptr<UserScriptIdleScheduler> user_script_idle_scheduler_; |
| 334 int http_status_code_; | 326 int http_status_code_; |
| 335 | 327 |
| 336 bool was_fetched_via_spdy_; | 328 bool was_fetched_via_spdy_; |
| 337 bool was_npn_negotiated_; | 329 bool was_npn_negotiated_; |
| 338 bool was_alternate_protocol_available_; | 330 bool was_alternate_protocol_available_; |
| 339 bool was_fetched_via_proxy_; | 331 bool was_fetched_via_proxy_; |
| 340 bool was_translated_; | 332 bool was_translated_; |
| 341 bool was_within_same_page_; | 333 bool was_within_same_page_; |
| 342 | 334 |
| 343 // A prefetcher is a page that contains link rel=prefetch elements. | 335 // A prefetcher is a page that contains link rel=prefetch elements. |
| 344 bool was_prefetcher_; | 336 bool was_prefetcher_; |
| 345 bool was_referred_by_prefetcher_; | 337 bool was_referred_by_prefetcher_; |
| 346 | 338 |
| 347 DISALLOW_COPY_AND_ASSIGN(NavigationState); | 339 DISALLOW_COPY_AND_ASSIGN(NavigationState); |
| 348 }; | 340 }; |
| 349 | 341 |
| 350 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ | 342 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ |
| OLD | NEW |