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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 LINK_LOAD_RELOAD, // JS/link directed reload. | 38 LINK_LOAD_RELOAD, // JS/link directed reload. |
39 LINK_LOAD_CACHE_STALE_OK, // back/forward or encoding change. | 39 LINK_LOAD_CACHE_STALE_OK, // back/forward or encoding change. |
40 LINK_LOAD_CACHE_ONLY, // Allow stale data (avoid doing a re-post) | 40 LINK_LOAD_CACHE_ONLY, // Allow stale data (avoid doing a re-post) |
41 kLoadTypeMax // Bounding value for this enum. | 41 kLoadTypeMax // Bounding value for this enum. |
42 }; | 42 }; |
43 | 43 |
44 DocumentState(); | 44 DocumentState(); |
45 ~DocumentState() override; | 45 ~DocumentState() override; |
46 | 46 |
47 static DocumentState* FromDataSource(blink::WebDataSource* ds) { | 47 static DocumentState* FromDataSource(blink::WebDataSource* ds) { |
48 return static_cast<DocumentState*>(ds->extraData()); | 48 return static_cast<DocumentState*>(ds->getExtraData()); |
49 } | 49 } |
50 | 50 |
51 // The time that this navigation was requested. | 51 // The time that this navigation was requested. |
52 const base::Time& request_time() const { | 52 const base::Time& request_time() const { |
53 return request_time_; | 53 return request_time_; |
54 } | 54 } |
55 void set_request_time(const base::Time& value) { | 55 void set_request_time(const base::Time& value) { |
56 DCHECK(start_load_time_.is_null()); | 56 DCHECK(start_load_time_.is_null()); |
57 request_time_ = value; | 57 request_time_ = value; |
58 } | 58 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 LoadType load_type_; | 240 LoadType load_type_; |
241 | 241 |
242 scoped_ptr<NavigationState> navigation_state_; | 242 scoped_ptr<NavigationState> navigation_state_; |
243 | 243 |
244 bool can_load_local_resources_; | 244 bool can_load_local_resources_; |
245 }; | 245 }; |
246 | 246 |
247 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ | 247 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ |
248 | 248 |
249 } // namespace content | 249 } // namespace content |
OLD | NEW |