| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // The time that the document and all subresources finished loading. | 94 // The time that the document and all subresources finished loading. |
| 95 const base::Time& finish_load_time() const { return finish_load_time_; } | 95 const base::Time& finish_load_time() const { return finish_load_time_; } |
| 96 void set_finish_load_time(const base::Time& value) { | 96 void set_finish_load_time(const base::Time& value) { |
| 97 DCHECK(!value.is_null()); | 97 DCHECK(!value.is_null()); |
| 98 DCHECK(finish_load_time_.is_null()); | 98 DCHECK(finish_load_time_.is_null()); |
| 99 // The following is not already set in all cases :-( | 99 // The following is not already set in all cases :-( |
| 100 // DCHECK(!finish_document_load_time_.is_null()); | 100 // DCHECK(!finish_document_load_time_.is_null()); |
| 101 finish_load_time_ = value; | 101 finish_load_time_ = value; |
| 102 } | 102 } |
| 103 | 103 |
| 104 // The time that painting first happened after a new navigation. | |
| 105 const base::Time& first_paint_time() const { return first_paint_time_; } | |
| 106 void set_first_paint_time(const base::Time& value) { | |
| 107 first_paint_time_ = value; | |
| 108 } | |
| 109 | |
| 110 // The time that painting first happened after the document loaded. | |
| 111 const base::Time& first_paint_after_load_time() const { | |
| 112 return first_paint_after_load_time_; | |
| 113 } | |
| 114 void set_first_paint_after_load_time(const base::Time& value) { | |
| 115 first_paint_after_load_time_ = value; | |
| 116 } | |
| 117 | |
| 118 // True iff the histograms for the associated frame have been dumped. | 104 // True iff the histograms for the associated frame have been dumped. |
| 119 bool load_histograms_recorded() const { return load_histograms_recorded_; } | 105 bool load_histograms_recorded() const { return load_histograms_recorded_; } |
| 120 void set_load_histograms_recorded(bool value) { | 106 void set_load_histograms_recorded(bool value) { |
| 121 load_histograms_recorded_ = value; | 107 load_histograms_recorded_ = value; |
| 122 } | 108 } |
| 123 | 109 |
| 124 bool web_timing_histograms_recorded() const { | 110 bool web_timing_histograms_recorded() const { |
| 125 return web_timing_histograms_recorded_; | 111 return web_timing_histograms_recorded_; |
| 126 } | 112 } |
| 127 void set_web_timing_histograms_recorded(bool value) { | 113 void set_web_timing_histograms_recorded(bool value) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void set_can_load_local_resources(bool can_load) { | 171 void set_can_load_local_resources(bool can_load) { |
| 186 can_load_local_resources_ = can_load; | 172 can_load_local_resources_ = can_load; |
| 187 } | 173 } |
| 188 | 174 |
| 189 private: | 175 private: |
| 190 base::Time request_time_; | 176 base::Time request_time_; |
| 191 base::Time start_load_time_; | 177 base::Time start_load_time_; |
| 192 base::Time commit_load_time_; | 178 base::Time commit_load_time_; |
| 193 base::Time finish_document_load_time_; | 179 base::Time finish_document_load_time_; |
| 194 base::Time finish_load_time_; | 180 base::Time finish_load_time_; |
| 195 base::Time first_paint_time_; | |
| 196 base::Time first_paint_after_load_time_; | |
| 197 bool load_histograms_recorded_; | 181 bool load_histograms_recorded_; |
| 198 bool web_timing_histograms_recorded_; | 182 bool web_timing_histograms_recorded_; |
| 199 bool was_fetched_via_spdy_; | 183 bool was_fetched_via_spdy_; |
| 200 bool was_alpn_negotiated_; | 184 bool was_alpn_negotiated_; |
| 201 std::string alpn_negotiated_protocol_; | 185 std::string alpn_negotiated_protocol_; |
| 202 bool was_alternate_protocol_available_; | 186 bool was_alternate_protocol_available_; |
| 203 net::HttpResponseInfo::ConnectionInfo connection_info_; | 187 net::HttpResponseInfo::ConnectionInfo connection_info_; |
| 204 | 188 |
| 205 bool was_load_data_with_base_url_request_; | 189 bool was_load_data_with_base_url_request_; |
| 206 GURL data_url_; | 190 GURL data_url_; |
| 207 | 191 |
| 208 LoadType load_type_; | 192 LoadType load_type_; |
| 209 | 193 |
| 210 std::unique_ptr<NavigationState> navigation_state_; | 194 std::unique_ptr<NavigationState> navigation_state_; |
| 211 | 195 |
| 212 bool can_load_local_resources_; | 196 bool can_load_local_resources_; |
| 213 }; | 197 }; |
| 214 | 198 |
| 215 } // namespace content | 199 } // namespace content |
| 216 | 200 |
| 217 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ | 201 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ |
| OLD | NEW |