| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_REQUEST_EXTRA_DATA_H_ | 5 #ifndef CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ |
| 6 #define CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ | 6 #define CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/common/page_transition_types.h" | 11 #include "content/public/common/page_transition_types.h" |
| 12 #include "webkit/glue/weburlrequest_extradata_impl.h" | 12 #include "webkit/glue/weburlrequest_extradata_impl.h" |
| 13 | 13 |
| 14 // The RenderView stores an instance of this class in the "extra data" of each | 14 // The RenderView stores an instance of this class in the "extra data" of each |
| 15 // ResourceRequest (see RenderView::willSendRequest). | 15 // ResourceRequest (see RenderView::willSendRequest). |
| 16 class CONTENT_EXPORT RequestExtraData | 16 class CONTENT_EXPORT RequestExtraData |
| 17 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { | 17 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { |
| 18 public: | 18 public: |
| 19 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, | 19 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, |
| 20 bool is_main_frame, | 20 bool is_main_frame, |
| 21 int64 frame_id, | 21 int64 frame_id, |
| 22 bool parent_is_main_frame, | 22 bool parent_is_main_frame, |
| 23 int64 parent_frame_id, | 23 int64 parent_frame_id, |
| 24 bool allow_download, |
| 24 content::PageTransition transition_type, | 25 content::PageTransition transition_type, |
| 25 int transferred_request_child_id, | 26 int transferred_request_child_id, |
| 26 int transferred_request_request_id); | 27 int transferred_request_request_id); |
| 27 virtual ~RequestExtraData(); | 28 virtual ~RequestExtraData(); |
| 28 | 29 |
| 29 bool is_main_frame() const { return is_main_frame_; } | 30 bool is_main_frame() const { return is_main_frame_; } |
| 30 int64 frame_id() const { return frame_id_; } | 31 int64 frame_id() const { return frame_id_; } |
| 31 bool parent_is_main_frame() const { return parent_is_main_frame_; } | 32 bool parent_is_main_frame() const { return parent_is_main_frame_; } |
| 32 int64 parent_frame_id() const { return parent_frame_id_; } | 33 int64 parent_frame_id() const { return parent_frame_id_; } |
| 34 bool allow_download() const { return allow_download_; } |
| 33 content::PageTransition transition_type() const { return transition_type_; } | 35 content::PageTransition transition_type() const { return transition_type_; } |
| 34 int transferred_request_child_id() const { | 36 int transferred_request_child_id() const { |
| 35 return transferred_request_child_id_; | 37 return transferred_request_child_id_; |
| 36 } | 38 } |
| 37 int transferred_request_request_id() const { | 39 int transferred_request_request_id() const { |
| 38 return transferred_request_request_id_; | 40 return transferred_request_request_id_; |
| 39 } | 41 } |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 bool is_main_frame_; | 44 bool is_main_frame_; |
| 43 int64 frame_id_; | 45 int64 frame_id_; |
| 44 bool parent_is_main_frame_; | 46 bool parent_is_main_frame_; |
| 45 int64 parent_frame_id_; | 47 int64 parent_frame_id_; |
| 48 bool allow_download_; |
| 46 content::PageTransition transition_type_; | 49 content::PageTransition transition_type_; |
| 47 int transferred_request_child_id_; | 50 int transferred_request_child_id_; |
| 48 int transferred_request_request_id_; | 51 int transferred_request_request_id_; |
| 49 | 52 |
| 50 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 53 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 #endif // CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ | 56 #endif // CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ |
| OLD | NEW |