| 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/child/web_url_loader_impl.h" | 9 #include "content/child/web_url_loader_impl.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/common/navigation_params.h" |
| 11 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 12 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 12 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
| 13 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 14 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 14 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 | 18 |
| 18 // Can be used by callers to store extra data on every ResourceRequest | 19 // Can be used by callers to store extra data on every ResourceRequest |
| 19 // which will be incorporated into the ResourceHostMsg_Request message | 20 // which will be incorporated into the ResourceHostMsg_Request message |
| 20 // sent by ResourceDispatcher. | 21 // sent by ResourceDispatcher. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 int transferred_request_request_id) { | 80 int transferred_request_request_id) { |
| 80 transferred_request_request_id_ = transferred_request_request_id; | 81 transferred_request_request_id_ = transferred_request_request_id; |
| 81 } | 82 } |
| 82 int service_worker_provider_id() const { | 83 int service_worker_provider_id() const { |
| 83 return service_worker_provider_id_; | 84 return service_worker_provider_id_; |
| 84 } | 85 } |
| 85 void set_service_worker_provider_id( | 86 void set_service_worker_provider_id( |
| 86 int service_worker_provider_id) { | 87 int service_worker_provider_id) { |
| 87 service_worker_provider_id_ = service_worker_provider_id; | 88 service_worker_provider_id_ = service_worker_provider_id; |
| 88 } | 89 } |
| 90 LoFiState lofi_state() const { |
| 91 return lofi_state_; |
| 92 } |
| 93 void set_lofi_state(LoFiState lofi_state) { |
| 94 lofi_state_ = lofi_state; |
| 95 } |
| 89 // |custom_user_agent| is used to communicate an overriding custom user agent | 96 // |custom_user_agent| is used to communicate an overriding custom user agent |
| 90 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no | 97 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no |
| 91 // override and an empty string to indicate that there should be no user | 98 // override and an empty string to indicate that there should be no user |
| 92 // agent. | 99 // agent. |
| 93 const blink::WebString& custom_user_agent() const { | 100 const blink::WebString& custom_user_agent() const { |
| 94 return custom_user_agent_; | 101 return custom_user_agent_; |
| 95 } | 102 } |
| 96 void set_custom_user_agent(const blink::WebString& custom_user_agent) { | 103 void set_custom_user_agent(const blink::WebString& custom_user_agent) { |
| 97 custom_user_agent_ = custom_user_agent; | 104 custom_user_agent_ = custom_user_agent; |
| 98 } | 105 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 123 int parent_render_frame_id_; | 130 int parent_render_frame_id_; |
| 124 bool allow_download_; | 131 bool allow_download_; |
| 125 ui::PageTransition transition_type_; | 132 ui::PageTransition transition_type_; |
| 126 bool should_replace_current_entry_; | 133 bool should_replace_current_entry_; |
| 127 int transferred_request_child_id_; | 134 int transferred_request_child_id_; |
| 128 int transferred_request_request_id_; | 135 int transferred_request_request_id_; |
| 129 int service_worker_provider_id_; | 136 int service_worker_provider_id_; |
| 130 blink::WebString custom_user_agent_; | 137 blink::WebString custom_user_agent_; |
| 131 blink::WebString requested_with_; | 138 blink::WebString requested_with_; |
| 132 scoped_ptr<StreamOverrideParameters> stream_override_; | 139 scoped_ptr<StreamOverrideParameters> stream_override_; |
| 140 LoFiState lofi_state_; |
| 133 | 141 |
| 134 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 142 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
| 135 }; | 143 }; |
| 136 | 144 |
| 137 } // namespace content | 145 } // namespace content |
| 138 | 146 |
| 139 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 147 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| OLD | NEW |