OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_WEB_URL_LOADER_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
9 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
10 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 12 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
11 | 13 |
| 14 class GURL; |
| 15 |
12 namespace webkit_glue { | 16 namespace webkit_glue { |
13 struct ResourceResponseInfo; | 17 struct ResourceResponseInfo; |
14 } | 18 } |
15 | 19 |
16 namespace content { | 20 namespace content { |
17 | 21 |
| 22 // Extracts the information from a data scheme URL. |
| 23 bool GetInfoFromDataURL(const GURL& url, |
| 24 webkit_glue::ResourceResponseInfo* info, |
| 25 std::string* data, |
| 26 int* error_code); |
| 27 |
18 class WebURLLoaderImpl : public blink::WebURLLoader { | 28 class WebURLLoaderImpl : public blink::WebURLLoader { |
19 public: | 29 public: |
20 WebURLLoaderImpl(); | 30 WebURLLoaderImpl(); |
21 virtual ~WebURLLoaderImpl(); | 31 virtual ~WebURLLoaderImpl(); |
22 | 32 |
23 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, | 33 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, |
24 bool stale_copy_in_cache, | 34 bool stale_copy_in_cache, |
25 int reason); | 35 int reason); |
26 CONTENT_EXPORT static void PopulateURLResponse( | 36 CONTENT_EXPORT static void PopulateURLResponse( |
27 const GURL& url, | 37 const GURL& url, |
(...skipping 14 matching lines...) Expand all Loading... |
42 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority); | 52 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority); |
43 | 53 |
44 private: | 54 private: |
45 class Context; | 55 class Context; |
46 scoped_refptr<Context> context_; | 56 scoped_refptr<Context> context_; |
47 }; | 57 }; |
48 | 58 |
49 } // namespace content | 59 } // namespace content |
50 | 60 |
51 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 61 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
OLD | NEW |