| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual int GetRouteID() const OVERRIDE; | 68 virtual int GetRouteID() const OVERRIDE; |
| 69 virtual int GetOriginPID() const OVERRIDE; | 69 virtual int GetOriginPID() const OVERRIDE; |
| 70 virtual int GetRequestID() const OVERRIDE; | 70 virtual int GetRequestID() const OVERRIDE; |
| 71 virtual bool IsMainFrame() const OVERRIDE; | 71 virtual bool IsMainFrame() const OVERRIDE; |
| 72 virtual int64 GetFrameID() const OVERRIDE; | 72 virtual int64 GetFrameID() const OVERRIDE; |
| 73 virtual bool ParentIsMainFrame() const OVERRIDE; | 73 virtual bool ParentIsMainFrame() const OVERRIDE; |
| 74 virtual int64 GetParentFrameID() const OVERRIDE; | 74 virtual int64 GetParentFrameID() const OVERRIDE; |
| 75 virtual ResourceType::Type GetResourceType() const OVERRIDE; | 75 virtual ResourceType::Type GetResourceType() const OVERRIDE; |
| 76 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; | 76 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; |
| 77 virtual uint64 GetUploadSize() const OVERRIDE; | 77 virtual uint64 GetUploadSize() const OVERRIDE; |
| 78 virtual bool HasUserGesture() const OVERRIDE; |
| 78 virtual bool GetAssociatedRenderView(int* render_process_id, | 79 virtual bool GetAssociatedRenderView(int* render_process_id, |
| 79 int* render_view_id) const OVERRIDE; | 80 int* render_view_id) const OVERRIDE; |
| 80 | 81 |
| 81 void AssociateWithRequest(net::URLRequest* request); | 82 void AssociateWithRequest(net::URLRequest* request); |
| 82 | 83 |
| 83 GlobalRequestID GetGlobalRequestID() const; | 84 GlobalRequestID GetGlobalRequestID() const; |
| 84 | 85 |
| 85 // CrossSiteResourceHandler for this request, if it is a cross-site request. | 86 // CrossSiteResourceHandler for this request, if it is a cross-site request. |
| 86 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers | 87 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers |
| 87 // pointed to by resource_handler, and is not owned by this class. | 88 // pointed to by resource_handler, and is not owned by this class. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 99 | 100 |
| 100 // Number of messages we've sent to the renderer that we haven't gotten an | 101 // Number of messages we've sent to the renderer that we haven't gotten an |
| 101 // ACK for. This allows us to avoid having too many messages in flight. | 102 // ACK for. This allows us to avoid having too many messages in flight. |
| 102 int pending_data_count() const { return pending_data_count_; } | 103 int pending_data_count() const { return pending_data_count_; } |
| 103 void IncrementPendingDataCount() { pending_data_count_++; } | 104 void IncrementPendingDataCount() { pending_data_count_++; } |
| 104 void DecrementPendingDataCount() { pending_data_count_--; } | 105 void DecrementPendingDataCount() { pending_data_count_--; } |
| 105 | 106 |
| 106 // Downloads are allowed only as a top level request. | 107 // Downloads are allowed only as a top level request. |
| 107 bool allow_download() const { return allow_download_; } | 108 bool allow_download() const { return allow_download_; } |
| 108 | 109 |
| 109 bool has_user_gesture() const { return has_user_gesture_; } | |
| 110 | |
| 111 // Whether this is a download. | 110 // Whether this is a download. |
| 112 bool is_download() const { return is_download_; } | 111 bool is_download() const { return is_download_; } |
| 113 void set_is_download(bool download) { is_download_ = download; } | 112 void set_is_download(bool download) { is_download_ = download; } |
| 114 | 113 |
| 115 PageTransition transition_type() const { return transition_type_; } | 114 PageTransition transition_type() const { return transition_type_; } |
| 116 | 115 |
| 117 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } | 116 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } |
| 118 | 117 |
| 119 // The approximate in-memory size (bytes) that we credited this request | 118 // The approximate in-memory size (bytes) that we credited this request |
| 120 // as consuming in |outstanding_requests_memory_cost_map_|. | 119 // as consuming in |outstanding_requests_memory_cost_map_|. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 151 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
| 153 WebKit::WebReferrerPolicy referrer_policy_; | 152 WebKit::WebReferrerPolicy referrer_policy_; |
| 154 ResourceContext* context_; | 153 ResourceContext* context_; |
| 155 | 154 |
| 156 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 155 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| 157 }; | 156 }; |
| 158 | 157 |
| 159 } // namespace content | 158 } // namespace content |
| 160 | 159 |
| 161 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 160 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |