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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_GLUE_WEBURLLOADER_IMPL_H_
6 #define WEBKIT_GLUE_WEBURLLOADER_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "third_party/WebKit/public/platform/WebURLLoader.h"
10 #include "webkit/glue/webkit_glue_export.h"
12 namespace webkit_glue
{
14 class WebKitPlatformSupportImpl
;
16 class WebURLLoaderImpl
: public WebKit::WebURLLoader
{
18 explicit WebURLLoaderImpl(WebKitPlatformSupportImpl
* platform
);
19 virtual ~WebURLLoaderImpl();
21 static WebKit::WebURLError
CreateError(const WebKit::WebURL
& unreachable_url
,
24 // WebURLLoader methods:
25 virtual void loadSynchronously(
26 const WebKit::WebURLRequest
& request
,
27 WebKit::WebURLResponse
& response
,
28 WebKit::WebURLError
& error
,
29 WebKit::WebData
& data
);
30 virtual void loadAsynchronously(
31 const WebKit::WebURLRequest
& request
,
32 WebKit::WebURLLoaderClient
* client
);
33 virtual void cancel();
34 virtual void setDefersLoading(bool value
);
35 virtual void didChangePriority(WebKit::WebURLRequest::Priority new_priority
);
39 scoped_refptr
<Context
> context_
;
40 WebKitPlatformSupportImpl
* platform_
;
43 } // namespace webkit_glue
45 #endif // WEBKIT_GLUE_WEBURLLOADER_IMPL_H_