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_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 virtual int GetRouteID() const OVERRIDE; | 73 virtual int GetRouteID() const OVERRIDE; |
74 virtual int GetOriginPID() const OVERRIDE; | 74 virtual int GetOriginPID() const OVERRIDE; |
75 virtual int GetRequestID() const OVERRIDE; | 75 virtual int GetRequestID() const OVERRIDE; |
76 virtual bool IsMainFrame() const OVERRIDE; | 76 virtual bool IsMainFrame() const OVERRIDE; |
77 virtual int64 GetFrameID() const OVERRIDE; | 77 virtual int64 GetFrameID() const OVERRIDE; |
78 virtual bool ParentIsMainFrame() const OVERRIDE; | 78 virtual bool ParentIsMainFrame() const OVERRIDE; |
79 virtual int64 GetParentFrameID() const OVERRIDE; | 79 virtual int64 GetParentFrameID() const OVERRIDE; |
80 virtual ResourceType::Type GetResourceType() const OVERRIDE; | 80 virtual ResourceType::Type GetResourceType() const OVERRIDE; |
81 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; | 81 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; |
82 virtual uint64 GetUploadSize() const OVERRIDE; | 82 virtual uint64 GetUploadSize() const OVERRIDE; |
| 83 virtual bool HasUserGesture() const OVERRIDE; |
83 virtual bool GetAssociatedRenderView(int* render_process_id, | 84 virtual bool GetAssociatedRenderView(int* render_process_id, |
84 int* render_view_id) const OVERRIDE; | 85 int* render_view_id) const OVERRIDE; |
85 | 86 |
86 void AssociateWithRequest(net::URLRequest* request); | 87 void AssociateWithRequest(net::URLRequest* request); |
87 | 88 |
88 // Top-level ResourceHandler servicing this request. | 89 // Top-level ResourceHandler servicing this request. |
89 ResourceHandler* resource_handler() { return resource_handler_.get(); } | 90 ResourceHandler* resource_handler() { return resource_handler_.get(); } |
90 void set_resource_handler(ResourceHandler* resource_handler); | 91 void set_resource_handler(ResourceHandler* resource_handler); |
91 | 92 |
92 // CrossSiteResourceHandler for this request, if it is a cross-site request. | 93 // CrossSiteResourceHandler for this request, if it is a cross-site request. |
(...skipping 30 matching lines...) Expand all Loading... |
123 | 124 |
124 // Number of messages we've sent to the renderer that we haven't gotten an | 125 // Number of messages we've sent to the renderer that we haven't gotten an |
125 // ACK for. This allows us to avoid having too many messages in flight. | 126 // ACK for. This allows us to avoid having too many messages in flight. |
126 int pending_data_count() const { return pending_data_count_; } | 127 int pending_data_count() const { return pending_data_count_; } |
127 void IncrementPendingDataCount() { pending_data_count_++; } | 128 void IncrementPendingDataCount() { pending_data_count_++; } |
128 void DecrementPendingDataCount() { pending_data_count_--; } | 129 void DecrementPendingDataCount() { pending_data_count_--; } |
129 | 130 |
130 // Downloads are allowed only as a top level request. | 131 // Downloads are allowed only as a top level request. |
131 bool allow_download() const { return allow_download_; } | 132 bool allow_download() const { return allow_download_; } |
132 | 133 |
133 bool has_user_gesture() const { return has_user_gesture_; } | |
134 | |
135 // Whether this is a download. | 134 // Whether this is a download. |
136 bool is_download() const { return is_download_; } | 135 bool is_download() const { return is_download_; } |
137 void set_is_download(bool download) { is_download_ = download; } | 136 void set_is_download(bool download) { is_download_ = download; } |
138 | 137 |
139 // The number of clients that have called pause on this request. | 138 // The number of clients that have called pause on this request. |
140 int pause_count() const { return pause_count_; } | 139 int pause_count() const { return pause_count_; } |
141 void set_pause_count(int count) { pause_count_ = count; } | 140 void set_pause_count(int count) { pause_count_ = count; } |
142 | 141 |
143 PageTransition transition_type() const { return transition_type_; } | 142 PageTransition transition_type() const { return transition_type_; } |
144 | 143 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool called_on_response_started_; | 247 bool called_on_response_started_; |
249 bool has_started_reading_; | 248 bool has_started_reading_; |
250 int paused_read_bytes_; | 249 int paused_read_bytes_; |
251 | 250 |
252 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 251 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
253 }; | 252 }; |
254 | 253 |
255 } // namespace content | 254 } // namespace content |
256 | 255 |
257 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 256 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |