Chromium Code Reviews| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/child/web_url_loader_impl.h" | 12 #include "content/child/web_url_loader_impl.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/navigation_params.h" | 14 #include "content/common/navigation_params.h" |
| 15 #include "content/common/url_loader_factory.mojom.h" | |
| 15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 16 #include "third_party/WebKit/public/platform/WebString.h" | 17 #include "third_party/WebKit/public/platform/WebString.h" |
| 17 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 18 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 18 #include "ui/base/page_transition_types.h" | 19 #include "ui/base/page_transition_types.h" |
| 19 #include "url/origin.h" | 20 #include "url/origin.h" |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 | 23 |
| 23 struct ResourceRequest; | 24 struct ResourceRequest; |
| 24 | 25 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 | 161 |
| 161 // PlzNavigate | 162 // PlzNavigate |
| 162 // Indicates whether a navigation was initiated by the browser or renderer. | 163 // Indicates whether a navigation was initiated by the browser or renderer. |
| 163 bool navigation_initiated_by_renderer() const { | 164 bool navigation_initiated_by_renderer() const { |
| 164 return navigation_initiated_by_renderer_; | 165 return navigation_initiated_by_renderer_; |
| 165 } | 166 } |
| 166 void set_navigation_initiated_by_renderer(bool navigation_by_renderer) { | 167 void set_navigation_initiated_by_renderer(bool navigation_by_renderer) { |
| 167 navigation_initiated_by_renderer_ = navigation_by_renderer; | 168 navigation_initiated_by_renderer_ = navigation_by_renderer; |
| 168 } | 169 } |
| 169 | 170 |
| 171 mojom::URLLoaderFactory* url_loader_factory_override() const { | |
|
scottmg
2017/05/05 19:27:43
Remove the content/child files as they're in the o
jam
2017/05/05 22:19:40
yep will merge when it lands
| |
| 172 return url_loader_factory_override_; | |
| 173 } | |
| 174 void set_url_loader_factory_override(mojom::URLLoaderFactory* factory) { | |
| 175 url_loader_factory_override_ = factory; | |
| 176 } | |
| 177 | |
| 170 void CopyToResourceRequest(ResourceRequest* request) const; | 178 void CopyToResourceRequest(ResourceRequest* request) const; |
| 171 | 179 |
| 172 private: | 180 private: |
| 173 blink::WebPageVisibilityState visibility_state_; | 181 blink::WebPageVisibilityState visibility_state_; |
| 174 int render_frame_id_; | 182 int render_frame_id_; |
| 175 bool is_main_frame_; | 183 bool is_main_frame_; |
| 176 url::Origin frame_origin_; | 184 url::Origin frame_origin_; |
| 177 bool parent_is_main_frame_; | 185 bool parent_is_main_frame_; |
| 178 int parent_render_frame_id_; | 186 int parent_render_frame_id_; |
| 179 bool allow_download_; | 187 bool allow_download_; |
| 180 ui::PageTransition transition_type_; | 188 ui::PageTransition transition_type_; |
| 181 bool should_replace_current_entry_; | 189 bool should_replace_current_entry_; |
| 182 int transferred_request_child_id_; | 190 int transferred_request_child_id_; |
| 183 int transferred_request_request_id_; | 191 int transferred_request_request_id_; |
| 184 int service_worker_provider_id_; | 192 int service_worker_provider_id_; |
| 185 bool originated_from_service_worker_; | 193 bool originated_from_service_worker_; |
| 186 blink::WebString custom_user_agent_; | 194 blink::WebString custom_user_agent_; |
| 187 blink::WebString requested_with_; | 195 blink::WebString requested_with_; |
| 188 std::unique_ptr<StreamOverrideParameters> stream_override_; | 196 std::unique_ptr<StreamOverrideParameters> stream_override_; |
| 189 bool initiated_in_secure_context_; | 197 bool initiated_in_secure_context_; |
| 190 bool is_prefetch_; | 198 bool is_prefetch_; |
| 191 bool download_to_network_cache_only_; | 199 bool download_to_network_cache_only_; |
| 192 bool block_mixed_plugin_content_; | 200 bool block_mixed_plugin_content_; |
| 193 bool navigation_initiated_by_renderer_; | 201 bool navigation_initiated_by_renderer_; |
| 202 mojom::URLLoaderFactory* url_loader_factory_override_; | |
| 194 | 203 |
| 195 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 204 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
| 196 }; | 205 }; |
| 197 | 206 |
| 198 } // namespace content | 207 } // namespace content |
| 199 | 208 |
| 200 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 209 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| OLD | NEW |