Added unit test for DevTools' ephemeral port support.
[chromium-blink-merge.git] / content / child / web_url_loader_impl.h
blobaffe1ab3443f0481f5bf53e85a0ecf6fb17057b9
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 content {
14 struct ResourceResponseInfo;
16 class WebURLLoaderImpl : public blink::WebURLLoader {
17 public:
18 WebURLLoaderImpl();
19 virtual ~WebURLLoaderImpl();
21 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url,
22 bool stale_copy_in_cache,
23 int reason);
24 CONTENT_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,
41 int intra_priority_value);
42 virtual bool attachThreadedDataReceiver(
43 blink::WebThreadedDataReceiver* threaded_data_receiver);
45 private:
46 class Context;
47 scoped_refptr<Context> context_;
50 } // namespace content
52 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_