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
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebURLLoader.h"
12 namespace webkit_glue
{
13 struct ResourceResponseInfo
;
18 class WebURLLoaderImpl
: public blink::WebURLLoader
{
21 virtual ~WebURLLoaderImpl();
23 static blink::WebURLError
CreateError(const blink::WebURL
& unreachable_url
,
24 bool stale_copy_in_cache
,
26 CONTENT_EXPORT
static void PopulateURLResponse(
28 const webkit_glue::ResourceResponseInfo
& info
,
29 blink::WebURLResponse
* response
);
31 // WebURLLoader methods:
32 virtual void loadSynchronously(
33 const blink::WebURLRequest
& request
,
34 blink::WebURLResponse
& response
,
35 blink::WebURLError
& error
,
36 blink::WebData
& data
);
37 virtual void loadAsynchronously(
38 const blink::WebURLRequest
& request
,
39 blink::WebURLLoaderClient
* client
);
40 virtual void cancel();
41 virtual void setDefersLoading(bool value
);
42 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority
,
43 int intra_priority_value
);
47 scoped_refptr
<Context
> context_
;
50 } // namespace content
52 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_