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" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 void set_service_worker_provider_id( | 84 void set_service_worker_provider_id( |
85 int service_worker_provider_id) { | 85 int service_worker_provider_id) { |
86 service_worker_provider_id_ = service_worker_provider_id; | 86 service_worker_provider_id_ = service_worker_provider_id; |
87 } | 87 } |
88 // |custom_user_agent| is used to communicate an overriding custom user agent | 88 // |custom_user_agent| is used to communicate an overriding custom user agent |
89 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no | 89 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no |
90 // override and an empty string to indicate that there should be no user | 90 // override and an empty string to indicate that there should be no user |
91 // agent. | 91 // agent. |
92 const blink::WebString& custom_user_agent() const { | 92 const blink::WebString& custom_user_agent() const { |
93 return custom_user_agent_; | 93 return custom_user_agent_; |
94 } | 94 } |
95 void set_custom_user_agent( | 95 void set_custom_user_agent(const blink::WebString& custom_user_agent) { |
96 const blink::WebString& custom_user_agent) { | |
97 custom_user_agent_ = custom_user_agent; | 96 custom_user_agent_ = custom_user_agent; |
98 } | 97 } |
| 98 const blink::WebString& requested_with() const { |
| 99 return requested_with_; |
| 100 } |
| 101 void set_requested_with(const blink::WebString& requested_with) { |
| 102 requested_with_ = requested_with; |
| 103 } |
99 | 104 |
100 private: | 105 private: |
101 blink::WebPageVisibilityState visibility_state_; | 106 blink::WebPageVisibilityState visibility_state_; |
102 int render_frame_id_; | 107 int render_frame_id_; |
103 bool is_main_frame_; | 108 bool is_main_frame_; |
104 GURL frame_origin_; | 109 GURL frame_origin_; |
105 bool parent_is_main_frame_; | 110 bool parent_is_main_frame_; |
106 int parent_render_frame_id_; | 111 int parent_render_frame_id_; |
107 bool allow_download_; | 112 bool allow_download_; |
108 PageTransition transition_type_; | 113 PageTransition transition_type_; |
109 bool should_replace_current_entry_; | 114 bool should_replace_current_entry_; |
110 int transferred_request_child_id_; | 115 int transferred_request_child_id_; |
111 int transferred_request_request_id_; | 116 int transferred_request_request_id_; |
112 int service_worker_provider_id_; | 117 int service_worker_provider_id_; |
113 blink::WebString custom_user_agent_; | 118 blink::WebString custom_user_agent_; |
| 119 blink::WebString requested_with_; |
114 | 120 |
115 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 121 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
116 }; | 122 }; |
117 | 123 |
118 } // namespace content | 124 } // namespace content |
119 | 125 |
120 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 126 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
OLD | NEW |