| 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" | |
| 11 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
| 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 11 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 13 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | 12 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" |
| 13 #include "ui/base/page_transition_types.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // Can be used by callers to store extra data on every ResourceRequest | 17 // Can be used by callers to store extra data on every ResourceRequest |
| 18 // which will be incorporated into the ResourceHostMsg_Request message | 18 // which will be incorporated into the ResourceHostMsg_Request message |
| 19 // sent by ResourceDispatcher. | 19 // sent by ResourceDispatcher. |
| 20 class CONTENT_EXPORT RequestExtraData | 20 class CONTENT_EXPORT RequestExtraData |
| 21 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { | 21 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { |
| 22 public: | 22 public: |
| 23 RequestExtraData(); | 23 RequestExtraData(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 46 parent_is_main_frame_ = parent_is_main_frame; | 46 parent_is_main_frame_ = parent_is_main_frame; |
| 47 } | 47 } |
| 48 int parent_render_frame_id() const { return parent_render_frame_id_; } | 48 int parent_render_frame_id() const { return parent_render_frame_id_; } |
| 49 void set_parent_render_frame_id(int parent_render_frame_id) { | 49 void set_parent_render_frame_id(int parent_render_frame_id) { |
| 50 parent_render_frame_id_ = parent_render_frame_id; | 50 parent_render_frame_id_ = parent_render_frame_id; |
| 51 } | 51 } |
| 52 bool allow_download() const { return allow_download_; } | 52 bool allow_download() const { return allow_download_; } |
| 53 void set_allow_download(bool allow_download) { | 53 void set_allow_download(bool allow_download) { |
| 54 allow_download_ = allow_download; | 54 allow_download_ = allow_download; |
| 55 } | 55 } |
| 56 PageTransition transition_type() const { return transition_type_; } | 56 ui::PageTransition transition_type() const { return transition_type_; } |
| 57 void set_transition_type(PageTransition transition_type) { | 57 void set_transition_type(ui::PageTransition transition_type) { |
| 58 transition_type_ = transition_type; | 58 transition_type_ = transition_type; |
| 59 } | 59 } |
| 60 bool should_replace_current_entry() const { | 60 bool should_replace_current_entry() const { |
| 61 return should_replace_current_entry_; | 61 return should_replace_current_entry_; |
| 62 } | 62 } |
| 63 void set_should_replace_current_entry( | 63 void set_should_replace_current_entry( |
| 64 bool should_replace_current_entry) { | 64 bool should_replace_current_entry) { |
| 65 should_replace_current_entry_ = should_replace_current_entry; | 65 should_replace_current_entry_ = should_replace_current_entry; |
| 66 } | 66 } |
| 67 int transferred_request_child_id() const { | 67 int transferred_request_child_id() const { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 blink::WebPageVisibilityState visibility_state_; | 106 blink::WebPageVisibilityState visibility_state_; |
| 107 int render_frame_id_; | 107 int render_frame_id_; |
| 108 bool is_main_frame_; | 108 bool is_main_frame_; |
| 109 GURL frame_origin_; | 109 GURL frame_origin_; |
| 110 bool parent_is_main_frame_; | 110 bool parent_is_main_frame_; |
| 111 int parent_render_frame_id_; | 111 int parent_render_frame_id_; |
| 112 bool allow_download_; | 112 bool allow_download_; |
| 113 PageTransition transition_type_; | 113 ui::PageTransition transition_type_; |
| 114 bool should_replace_current_entry_; | 114 bool should_replace_current_entry_; |
| 115 int transferred_request_child_id_; | 115 int transferred_request_child_id_; |
| 116 int transferred_request_request_id_; | 116 int transferred_request_request_id_; |
| 117 int service_worker_provider_id_; | 117 int service_worker_provider_id_; |
| 118 blink::WebString custom_user_agent_; | 118 blink::WebString custom_user_agent_; |
| 119 blink::WebString requested_with_; | 119 blink::WebString requested_with_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); | 121 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace content | 124 } // namespace content |
| 125 | 125 |
| 126 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ | 126 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ |
| OLD | NEW |