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 #include "content/child/request_extra_data.h" | 5 #include "content/child/request_extra_data.h" |
6 | 6 |
7 using blink::WebString; | 7 using blink::WebString; |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 RequestExtraData::RequestExtraData( | 11 RequestExtraData::RequestExtraData() { |
12 blink::WebPageVisibilityState visibility_state, | 12 } |
13 const WebString& custom_user_agent, | 13 |
14 bool was_after_preconnect_request, | 14 void RequestExtraData::set_visibility_state( |
15 int render_frame_id, | 15 blink::WebPageVisibilityState visibility_state) { |
16 bool is_main_frame, | 16 visibility_state_ = visibility_state; |
17 const GURL& frame_origin, | 17 } |
18 bool parent_is_main_frame, | 18 |
19 int parent_render_frame_id, | 19 void RequestExtraData::set_render_frame_id(int render_frame_id) { |
20 bool allow_download, | 20 render_frame_id_ = render_frame_id; |
21 PageTransition transition_type, | 21 } |
22 bool should_replace_current_entry, | 22 |
23 int transferred_request_child_id, | 23 void RequestExtraData::set_is_main_frame(bool is_main_frame) { |
24 int transferred_request_request_id, | 24 is_main_frame_ = is_main_frame; |
25 int service_worker_provider_id) | 25 } |
26 : webkit_glue::WebURLRequestExtraDataImpl(custom_user_agent, | 26 |
27 was_after_preconnect_request), | 27 void RequestExtraData::set_frame_origin(const GURL& frame_origin) { |
28 visibility_state_(visibility_state), | 28 frame_origin_ = frame_origin; |
29 render_frame_id_(render_frame_id), | 29 } |
30 is_main_frame_(is_main_frame), | 30 |
31 frame_origin_(frame_origin), | 31 void RequestExtraData::set_parent_is_main_frame(bool parent_is_main_frame) { |
32 parent_is_main_frame_(parent_is_main_frame), | 32 parent_is_main_frame_ = parent_is_main_frame; |
33 parent_render_frame_id_(parent_render_frame_id), | 33 } |
34 allow_download_(allow_download), | 34 |
35 transition_type_(transition_type), | 35 void RequestExtraData::set_parent_render_frame_id(int parent_render_frame_id) { |
36 should_replace_current_entry_(should_replace_current_entry), | 36 parent_render_frame_id_ = parent_render_frame_id; |
37 transferred_request_child_id_(transferred_request_child_id), | 37 } |
38 transferred_request_request_id_(transferred_request_request_id), | 38 |
39 service_worker_provider_id_(service_worker_provider_id) { | 39 void RequestExtraData::set_allow_download(bool allow_download) { |
| 40 allow_download_ = allow_download; |
| 41 } |
| 42 |
| 43 void RequestExtraData::set_transition_type(PageTransition transition_type) { |
| 44 transition_type_ = transition_type; |
| 45 } |
| 46 |
| 47 void RequestExtraData::set_should_replace_current_entry( |
| 48 bool should_replace_current_entry) { |
| 49 should_replace_current_entry_ = should_replace_current_entry; |
| 50 } |
| 51 |
| 52 void RequestExtraData::set_transferred_request_child_id( |
| 53 int transferred_request_child_id) { |
| 54 transferred_request_child_id_ = transferred_request_child_id; |
| 55 } |
| 56 |
| 57 void RequestExtraData::set_transferred_request_request_id( |
| 58 int transferred_request_request_id) { |
| 59 transferred_request_request_id_ = transferred_request_request_id; |
| 60 } |
| 61 |
| 62 void RequestExtraData::set_service_worker_provider_id( |
| 63 int service_worker_provider_id) { |
| 64 service_worker_provider_id_ = service_worker_provider_id; |
| 65 } |
| 66 |
| 67 void RequestExtraData::set_custom_user_agent( |
| 68 const blink::WebString& custom_user_agent) { |
| 69 custom_user_agent_ = custom_user_agent; |
| 70 } |
| 71 |
| 72 void RequestExtraData::set_was_after_preconnect_request( |
| 73 bool was_after_preconnect_request) { |
| 74 was_after_preconnect_request_ = was_after_preconnect_request; |
40 } | 75 } |
41 | 76 |
42 RequestExtraData::~RequestExtraData() { | 77 RequestExtraData::~RequestExtraData() { |
43 } | 78 } |
44 | 79 |
45 } // namespace content | 80 } // namespace content |
OLD | NEW |