Get foreground tab on Android
[chromium-blink-merge.git] / webkit / child / weburlloader_impl.h
blob3cd200183bbc2b6591fec54a01872093e6858688
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_CHILD_WEBURLLOADER_IMPL_H_
6 #define WEBKIT_CHILD_WEBURLLOADER_IMPL_H_
8 #include "base/memory/ref_counted.h"
9 #include "third_party/WebKit/public/platform/WebURLLoader.h"
10 #include "webkit/child/webkit_child_export.h"
12 namespace webkit_glue {
14 class WebKitPlatformSupportImpl;
15 struct ResourceResponseInfo;
17 class WebURLLoaderImpl : public blink::WebURLLoader {
18 public:
19 explicit WebURLLoaderImpl(WebKitPlatformSupportImpl* platform);
20 virtual ~WebURLLoaderImpl();
22 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url,
23 int reason);
24 WEBKIT_CHILD_EXPORT static void PopulateURLResponse(
25 const GURL& url,
26 const ResourceResponseInfo& info,
27 blink::WebURLResponse* response);
29 // WebURLLoader methods:
30 virtual void loadSynchronously(
31 const blink::WebURLRequest& request,
32 blink::WebURLResponse& response,
33 blink::WebURLError& error,
34 blink::WebData& data);
35 virtual void loadAsynchronously(
36 const blink::WebURLRequest& request,
37 blink::WebURLLoaderClient* client);
38 virtual void cancel();
39 virtual void setDefersLoading(bool value);
40 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority);
42 private:
43 class Context;
44 scoped_refptr<Context> context_;
45 WebKitPlatformSupportImpl* platform_;
48 } // namespace webkit_glue
50 #endif // WEBKIT_CHILD_WEBURLLOADER_IMPL_H_