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_CHILD_REQUEST_EXTRA_DATA_H_ | 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
11 #include "third_party/WebKit/public/platform/WebString.h" | 11 #include "third_party/WebKit/public/platform/WebString.h" |
12 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
13 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | 13 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 // The RenderView stores an instance of this class in the "extra data" of each | 17 // Can be used by callers to store extra data on every ResourceRequest |
18 // ResourceRequest (see RenderFrameImpl::willSendRequest). | 18 // which will be incorporated into the ResourceHostMsg_Request message |
| 19 // sent by ResourceDispatcher. |
19 class CONTENT_EXPORT RequestExtraData | 20 class CONTENT_EXPORT RequestExtraData |
20 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { | 21 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { |
21 public: | 22 public: |
22 RequestExtraData(); | 23 RequestExtraData(); |
23 virtual ~RequestExtraData(); | 24 virtual ~RequestExtraData(); |
24 | 25 |
25 blink::WebPageVisibilityState visibility_state() const { | 26 blink::WebPageVisibilityState visibility_state() const { |
26 return visibility_state_; | 27 return visibility_state_; |
27 } | 28 } |
28 void set_visibility_state(blink::WebPageVisibilityState visibility_state) { | 29 void set_visibility_state(blink::WebPageVisibilityState visibility_state) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 int service_worker_provider_id_; | 117 int service_worker_provider_id_; |
117 blink::WebString custom_user_agent_; | 118 blink::WebString custom_user_agent_; |
118 bool was_after_preconnect_request_; | 119 bool was_after_preconnect_request_; |
119 | 120 |
120 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 121 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
121 }; | 122 }; |
122 | 123 |
123 } // namespace content | 124 } // namespace content |
124 | 125 |
125 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 126 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
OLD | NEW |