Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1919)

Unified Diff: content/public/child/resource_loader_bridge.h

Issue 186193005: Move resource_loader_bridge to content/public/child/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/child/resource_dispatcher_delegate.h ('k') | content/public/child/resource_loader_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/child/resource_loader_bridge.h
diff --git a/webkit/child/resource_loader_bridge.h b/content/public/child/resource_loader_bridge.h
similarity index 86%
rename from webkit/child/resource_loader_bridge.h
rename to content/public/child/resource_loader_bridge.h
index 2a54d616793b189b9b2a8b6ec4f7a330f458a03b..a012d23109f0701f7dfa8560a36623eef29bcd12 100644
--- a/webkit/child/resource_loader_bridge.h
+++ b/content/public/child/resource_loader_bridge.h
@@ -13,8 +13,8 @@
// In turn, the bridge's owner on the WebKit end will implement the Peer
// interface, which we will use to communicate notifications back.
-#ifndef WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_
-#define WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_
+#ifndef CONTENT_PUBLIC_CHILD_RESOURCE_LOADER_BRIDGE_H_
+#define CONTENT_PUBLIC_CHILD_RESOURCE_LOADER_BRIDGE_H_
#include <utility>
@@ -25,22 +25,25 @@
#include "base/memory/ref_counted.h"
#include "base/platform_file.h"
#include "base/values.h"
+#include "content/common/content_export.h"
#include "net/base/request_priority.h"
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "url/gurl.h"
-#include "webkit/child/webkit_child_export.h"
#include "webkit/common/resource_response_info.h"
#include "webkit/common/resource_type.h"
namespace webkit_glue {
class ResourceRequestBody;
+}
+
+namespace content {
class ResourceLoaderBridge {
jam 2014/03/04 20:36:04 This class was originally created to bridge code i
public:
// Structure used when calling
// WebKitPlatformSupportImpl::CreateResourceLoader().
- struct WEBKIT_CHILD_EXPORT RequestInfo {
+ struct CONTENT_EXPORT RequestInfo {
jam 2014/03/04 20:36:04 this is only used inside content, so it should go
RequestInfo();
~RequestInfo();
@@ -105,9 +108,9 @@ class ResourceLoaderBridge {
// See the SyncLoad method declared below. (The name of this struct is not
// suffixed with "Info" because it also contains the response data.)
- struct SyncLoadResponse : ResourceResponseInfo {
- WEBKIT_CHILD_EXPORT SyncLoadResponse();
- WEBKIT_CHILD_EXPORT ~SyncLoadResponse();
+ struct SyncLoadResponse : webkit_glue::ResourceResponseInfo {
jam 2014/03/04 20:36:04 ditto: content/child/sync_load_response.*
+ CONTENT_EXPORT SyncLoadResponse();
+ CONTENT_EXPORT ~SyncLoadResponse();
// The response error code.
int error_code;
@@ -127,7 +130,7 @@ class ResourceLoaderBridge {
// These callbacks mirror net::URLRequest::Delegate and the order and
// conditions in which they will be called are identical. See url_request.h
// for more information.
- class WEBKIT_CHILD_EXPORT Peer {
+ class CONTENT_EXPORT Peer {
jam 2014/03/04 20:36:04 this should be in its own file in content/public/c
public:
// Called as upload progress is made.
// note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set
@@ -140,14 +143,16 @@ class ResourceLoaderBridge {
// output parameter *has_new_first_party_for_cookies indicates whether the
// output parameter *new_first_party_for_cookies contains the new URL that
// should be consulted for the third-party cookie blocking policy.
- virtual bool OnReceivedRedirect(const GURL& new_url,
- const ResourceResponseInfo& info,
- bool* has_new_first_party_for_cookies,
- GURL* new_first_party_for_cookies) = 0;
+ virtual bool OnReceivedRedirect(
+ const GURL& new_url,
+ const webkit_glue::ResourceResponseInfo& info,
+ bool* has_new_first_party_for_cookies,
+ GURL* new_first_party_for_cookies) = 0;
// Called when response headers are available (after all redirects have
// been followed).
- virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0;
+ virtual void OnReceivedResponse(
+ const webkit_glue::ResourceResponseInfo& info) = 0;
// Called when a chunk of response data is downloaded. This method may be
// called multiple times or not at all if an error occurs. This method is
@@ -169,17 +174,16 @@ class ResourceLoaderBridge {
// Called when metadata generated by the renderer is retrieved from the
// cache. This method may be called zero or one times.
- virtual void OnReceivedCachedMetadata(const char* data, int len) { }
+ virtual void OnReceivedCachedMetadata(const char* data, int len) {}
// Called when the response is complete. This method signals completion of
// the resource load.
- virtual void OnCompletedRequest(
- int error_code,
- bool was_ignored_by_handler,
- bool stale_copy_in_cache,
- const std::string& security_info,
- const base::TimeTicks& completion_time,
- int64 total_transfer_size) = 0;
+ virtual void OnCompletedRequest(int error_code,
+ bool was_ignored_by_handler,
+ bool stale_copy_in_cache,
+ const std::string& security_info,
+ const base::TimeTicks& completion_time,
+ int64 total_transfer_size) = 0;
protected:
virtual ~Peer() {}
@@ -187,11 +191,12 @@ class ResourceLoaderBridge {
// use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but
// anybody can delete at any time, INCLUDING during processing of callbacks.
- WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge();
+ CONTENT_EXPORT virtual ~ResourceLoaderBridge();
// Call this method before calling Start() to set the request body.
// May only be used with HTTP(S) POST requests.
- virtual void SetRequestBody(ResourceRequestBody* request_body) = 0;
+ virtual void SetRequestBody(
+ webkit_glue::ResourceRequestBody* request_body) = 0;
// Call this method to initiate the request. If this method succeeds, then
// the peer's methods will be called asynchronously to report various events.
@@ -226,7 +231,7 @@ class ResourceLoaderBridge {
// WebKitPlatformSupportImpl::CreateResourceLoader()
// For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload
// methods may be called to construct the body of the request.
- WEBKIT_CHILD_EXPORT ResourceLoaderBridge();
+ CONTENT_EXPORT ResourceLoaderBridge();
private:
DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge);
@@ -234,4 +239,4 @@ class ResourceLoaderBridge {
} // namespace webkit_glue
-#endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_
+#endif // CONTENT_PUBLIC_CHILD_RESOURCE_LOADER_BRIDGE_H_
« no previous file with comments | « content/public/child/resource_dispatcher_delegate.h ('k') | content/public/child/resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698