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