| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ | 5 #ifndef CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ |
| 6 #define CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ | 6 #define CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 const GURL& searchable_form_url() const { return searchable_form_url_; } | 45 const GURL& searchable_form_url() const { return searchable_form_url_; } |
| 46 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } | 46 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } |
| 47 const std::string& searchable_form_encoding() const { | 47 const std::string& searchable_form_encoding() const { |
| 48 return searchable_form_encoding_; | 48 return searchable_form_encoding_; |
| 49 } | 49 } |
| 50 void set_searchable_form_encoding(const std::string& encoding) { | 50 void set_searchable_form_encoding(const std::string& encoding) { |
| 51 searchable_form_encoding_ = encoding; | 51 searchable_form_encoding_ = encoding; |
| 52 } | 52 } |
| 53 | 53 |
| 54 // True if an error page should be used, if the http status code also | |
| 55 // indicates an error. | |
| 56 bool use_error_page() const { return use_error_page_; } | |
| 57 void set_use_error_page(bool use_error_page) { | |
| 58 use_error_page_ = use_error_page; | |
| 59 } | |
| 60 | |
| 61 // True if the user agent was overridden for this page. | 54 // True if the user agent was overridden for this page. |
| 62 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } | 55 bool is_overriding_user_agent() const { return is_overriding_user_agent_; } |
| 63 void set_is_overriding_user_agent(bool state) { | 56 void set_is_overriding_user_agent(bool state) { |
| 64 is_overriding_user_agent_ = state; | 57 is_overriding_user_agent_ = state; |
| 65 } | 58 } |
| 66 | 59 |
| 67 // True if we have to reset the scroll and scale state of the page | 60 // True if we have to reset the scroll and scale state of the page |
| 68 // after the provisional load has been committed. | 61 // after the provisional load has been committed. |
| 69 bool must_reset_scroll_and_scale_state() const { | 62 bool must_reset_scroll_and_scale_state() const { |
| 70 return must_reset_scroll_and_scale_state_; | 63 return must_reset_scroll_and_scale_state_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 94 | 87 |
| 95 protected: | 88 protected: |
| 96 ~InternalDocumentStateData() override; | 89 ~InternalDocumentStateData() override; |
| 97 | 90 |
| 98 private: | 91 private: |
| 99 bool did_first_visually_non_empty_layout_; | 92 bool did_first_visually_non_empty_layout_; |
| 100 bool did_first_visually_non_empty_paint_; | 93 bool did_first_visually_non_empty_paint_; |
| 101 int http_status_code_; | 94 int http_status_code_; |
| 102 GURL searchable_form_url_; | 95 GURL searchable_form_url_; |
| 103 std::string searchable_form_encoding_; | 96 std::string searchable_form_encoding_; |
| 104 bool use_error_page_; | |
| 105 bool is_overriding_user_agent_; | 97 bool is_overriding_user_agent_; |
| 106 bool must_reset_scroll_and_scale_state_; | 98 bool must_reset_scroll_and_scale_state_; |
| 107 bool cache_policy_override_set_; | 99 bool cache_policy_override_set_; |
| 108 blink::WebURLRequest::CachePolicy cache_policy_override_; | 100 blink::WebURLRequest::CachePolicy cache_policy_override_; |
| 109 | 101 |
| 110 DISALLOW_COPY_AND_ASSIGN(InternalDocumentStateData); | 102 DISALLOW_COPY_AND_ASSIGN(InternalDocumentStateData); |
| 111 }; | 103 }; |
| 112 | 104 |
| 113 } // namespace content | 105 } // namespace content |
| 114 | 106 |
| 115 #endif // CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ | 107 #endif // CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_ |
| OLD | NEW |