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 "webkit/child/weburlrequest_extradata_impl.h" | 11 #include "webkit/child/weburlrequest_extradata_impl.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 // The RenderView stores an instance of this class in the "extra data" of each | 15 // The RenderView stores an instance of this class in the "extra data" of each |
16 // ResourceRequest (see RenderView::willSendRequest). | 16 // ResourceRequest (see RenderView::willSendRequest). |
17 class CONTENT_EXPORT RequestExtraData | 17 class CONTENT_EXPORT RequestExtraData |
18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { | 18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { |
19 public: | 19 public: |
20 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, | 20 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, |
21 const WebKit::WebString& custom_user_agent, | 21 const WebKit::WebString& custom_user_agent, |
22 bool was_after_preconnect_request, | 22 bool was_after_preconnect_request, |
23 bool is_main_frame, | 23 bool is_main_frame, |
24 int64 frame_id, | 24 int64 frame_id, |
| 25 const GURL& frame_origin, |
25 bool parent_is_main_frame, | 26 bool parent_is_main_frame, |
26 int64 parent_frame_id, | 27 int64 parent_frame_id, |
27 bool allow_download, | 28 bool allow_download, |
28 PageTransition transition_type, | 29 PageTransition transition_type, |
29 int transferred_request_child_id, | 30 int transferred_request_child_id, |
30 int transferred_request_request_id); | 31 int transferred_request_request_id); |
31 virtual ~RequestExtraData(); | 32 virtual ~RequestExtraData(); |
32 | 33 |
33 bool is_main_frame() const { return is_main_frame_; } | 34 bool is_main_frame() const { return is_main_frame_; } |
34 int64 frame_id() const { return frame_id_; } | 35 int64 frame_id() const { return frame_id_; } |
| 36 GURL frame_origin() const { return frame_origin_; } |
35 bool parent_is_main_frame() const { return parent_is_main_frame_; } | 37 bool parent_is_main_frame() const { return parent_is_main_frame_; } |
36 int64 parent_frame_id() const { return parent_frame_id_; } | 38 int64 parent_frame_id() const { return parent_frame_id_; } |
37 bool allow_download() const { return allow_download_; } | 39 bool allow_download() const { return allow_download_; } |
38 PageTransition transition_type() const { return transition_type_; } | 40 PageTransition transition_type() const { return transition_type_; } |
39 int transferred_request_child_id() const { | 41 int transferred_request_child_id() const { |
40 return transferred_request_child_id_; | 42 return transferred_request_child_id_; |
41 } | 43 } |
42 int transferred_request_request_id() const { | 44 int transferred_request_request_id() const { |
43 return transferred_request_request_id_; | 45 return transferred_request_request_id_; |
44 } | 46 } |
45 | 47 |
46 private: | 48 private: |
47 bool is_main_frame_; | 49 bool is_main_frame_; |
48 int64 frame_id_; | 50 int64 frame_id_; |
| 51 GURL frame_origin_; |
49 bool parent_is_main_frame_; | 52 bool parent_is_main_frame_; |
50 int64 parent_frame_id_; | 53 int64 parent_frame_id_; |
51 bool allow_download_; | 54 bool allow_download_; |
52 PageTransition transition_type_; | 55 PageTransition transition_type_; |
53 int transferred_request_child_id_; | 56 int transferred_request_child_id_; |
54 int transferred_request_request_id_; | 57 int transferred_request_request_id_; |
55 | 58 |
56 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 59 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
57 }; | 60 }; |
58 | 61 |
59 } // namespace content | 62 } // namespace content |
60 | 63 |
61 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 64 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
OLD | NEW |