| 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_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Holds the data ResourceDispatcherHost associates with each request. | 28 // Holds the data ResourceDispatcherHost associates with each request. |
| 29 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. | 29 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. |
| 30 class ResourceRequestInfoImpl : public ResourceRequestInfo, | 30 class ResourceRequestInfoImpl : public ResourceRequestInfo, |
| 31 public base::SupportsUserData::Data { | 31 public base::SupportsUserData::Data { |
| 32 public: | 32 public: |
| 33 // Returns the ResourceRequestInfoImpl associated with the given URLRequest. | 33 // Returns the ResourceRequestInfoImpl associated with the given URLRequest. |
| 34 CONTENT_EXPORT static ResourceRequestInfoImpl* ForRequest( | 34 CONTENT_EXPORT static ResourceRequestInfoImpl* ForRequest( |
| 35 net::URLRequest* request); | 35 net::URLRequest* request); |
| 36 | 36 |
| 37 // And, a const version for cases where you only need read access. | 37 // And, a const version for cases where you only need read access. |
| 38 static const ResourceRequestInfoImpl* ForRequest( | 38 CONTENT_EXPORT static const ResourceRequestInfoImpl* ForRequest( |
| 39 const net::URLRequest* request); | 39 const net::URLRequest* request); |
| 40 | 40 |
| 41 CONTENT_EXPORT ResourceRequestInfoImpl( | 41 CONTENT_EXPORT ResourceRequestInfoImpl( |
| 42 int process_type, | 42 int process_type, |
| 43 int child_id, | 43 int child_id, |
| 44 int route_id, | 44 int route_id, |
| 45 int origin_pid, | 45 int origin_pid, |
| 46 int request_id, | 46 int request_id, |
| 47 bool is_main_frame, | 47 bool is_main_frame, |
| 48 int64 frame_id, | 48 int64 frame_id, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 72 virtual ResourceType::Type GetResourceType() const OVERRIDE; | 72 virtual ResourceType::Type GetResourceType() const OVERRIDE; |
| 73 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; | 73 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; |
| 74 virtual PageTransition GetPageTransition() const OVERRIDE; | 74 virtual PageTransition GetPageTransition() const OVERRIDE; |
| 75 virtual bool HasUserGesture() const OVERRIDE; | 75 virtual bool HasUserGesture() const OVERRIDE; |
| 76 virtual bool WasIgnoredByHandler() const OVERRIDE; | 76 virtual bool WasIgnoredByHandler() const OVERRIDE; |
| 77 virtual bool GetAssociatedRenderView(int* render_process_id, | 77 virtual bool GetAssociatedRenderView(int* render_process_id, |
| 78 int* render_view_id) const OVERRIDE; | 78 int* render_view_id) const OVERRIDE; |
| 79 virtual bool IsAsync() const OVERRIDE; | 79 virtual bool IsAsync() const OVERRIDE; |
| 80 | 80 |
| 81 | 81 |
| 82 void AssociateWithRequest(net::URLRequest* request); | 82 CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request); |
| 83 | 83 |
| 84 GlobalRequestID GetGlobalRequestID() const; | 84 CONTENT_EXPORT GlobalRequestID GetGlobalRequestID() const; |
| 85 | 85 |
| 86 // CrossSiteResourceHandler for this request. May be null. | 86 // CrossSiteResourceHandler for this request. May be null. |
| 87 CrossSiteResourceHandler* cross_site_handler() { | 87 CrossSiteResourceHandler* cross_site_handler() { |
| 88 return cross_site_handler_; | 88 return cross_site_handler_; |
| 89 } | 89 } |
| 90 void set_cross_site_handler(CrossSiteResourceHandler* h) { | 90 void set_cross_site_handler(CrossSiteResourceHandler* h) { |
| 91 cross_site_handler_ = h; | 91 cross_site_handler_ = h; |
| 92 } | 92 } |
| 93 | 93 |
| 94 // Identifies the type of process (renderer, plugin, etc.) making the request. | 94 // Identifies the type of process (renderer, plugin, etc.) making the request. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 WebKit::WebReferrerPolicy referrer_policy_; | 146 WebKit::WebReferrerPolicy referrer_policy_; |
| 147 ResourceContext* context_; | 147 ResourceContext* context_; |
| 148 bool is_async_; | 148 bool is_async_; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 150 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace content | 153 } // namespace content |
| 154 | 154 |
| 155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |