| 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 WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ | 5 #ifndef WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ |
| 6 #define WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ | 6 #define WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 9 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 10 #include "webkit/child/webkit_child_export.h" | 10 #include "webkit/child/webkit_child_export.h" |
| 11 | 11 |
| 12 namespace blink { |
| 13 class WebParserResourceBridge; |
| 14 } |
| 15 |
| 12 namespace webkit_glue { | 16 namespace webkit_glue { |
| 13 | 17 |
| 14 class WebKitPlatformSupportImpl; | 18 class WebKitPlatformSupportImpl; |
| 15 struct ResourceResponseInfo; | 19 struct ResourceResponseInfo; |
| 16 | 20 |
| 17 class WebURLLoaderImpl : public blink::WebURLLoader { | 21 class WebURLLoaderImpl : public blink::WebURLLoader { |
| 18 public: | 22 public: |
| 19 explicit WebURLLoaderImpl(WebKitPlatformSupportImpl* platform); | 23 explicit WebURLLoaderImpl(WebKitPlatformSupportImpl* platform); |
| 20 virtual ~WebURLLoaderImpl(); | 24 virtual ~WebURLLoaderImpl(); |
| 21 | 25 |
| 22 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, | 26 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, |
| 23 int reason); | 27 int reason); |
| 24 WEBKIT_CHILD_EXPORT static void PopulateURLResponse( | 28 WEBKIT_CHILD_EXPORT static void PopulateURLResponse( |
| 25 const GURL& url, | 29 const GURL& url, |
| 26 const ResourceResponseInfo& info, | 30 const ResourceResponseInfo& info, |
| 27 blink::WebURLResponse* response); | 31 blink::WebURLResponse* response); |
| 28 | 32 |
| 29 // WebURLLoader methods: | 33 // WebURLLoader methods: |
| 30 virtual void loadSynchronously( | 34 virtual void loadSynchronously( |
| 31 const blink::WebURLRequest& request, | 35 const blink::WebURLRequest& request, |
| 32 blink::WebURLResponse& response, | 36 blink::WebURLResponse& response, |
| 33 blink::WebURLError& error, | 37 blink::WebURLError& error, |
| 34 blink::WebData& data); | 38 blink::WebData& data); |
| 35 virtual void loadAsynchronously( | 39 virtual void loadAsynchronously( |
| 36 const blink::WebURLRequest& request, | 40 const blink::WebURLRequest& request, |
| 37 blink::WebURLLoaderClient* client); | 41 blink::WebURLLoaderClient* client); |
| 38 virtual void cancel(); | 42 virtual void cancel(); |
| 39 virtual void setDefersLoading(bool value); | 43 virtual void setDefersLoading(bool value); |
| 40 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority); | 44 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority); |
| 45 virtual blink::WebParserResourceBridge* constructParserResourceBridge(); |
| 41 | 46 |
| 42 private: | 47 private: |
| 43 class Context; | 48 class Context; |
| 44 scoped_refptr<Context> context_; | 49 scoped_refptr<Context> context_; |
| 45 WebKitPlatformSupportImpl* platform_; | 50 WebKitPlatformSupportImpl* platform_; |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 } // namespace webkit_glue | 53 } // namespace webkit_glue |
| 49 | 54 |
| 50 #endif // WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ | 55 #endif // WEBKIT_CHILD_WEBURLLOADER_IMPL_H_ |
| OLD | NEW |