| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 GURL stream_url; | 31 GURL stream_url; |
| 32 ResourceResponseHead response; | 32 ResourceResponseHead response; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 class CONTENT_EXPORT WebURLLoaderImpl | 35 class CONTENT_EXPORT WebURLLoaderImpl |
| 36 : public NON_EXPORTED_BASE(blink::WebURLLoader) { | 36 : public NON_EXPORTED_BASE(blink::WebURLLoader) { |
| 37 public: | 37 public: |
| 38 explicit WebURLLoaderImpl( | 38 explicit WebURLLoaderImpl( |
| 39 ResourceDispatcher* resource_dispatcher, | 39 ResourceDispatcher* resource_dispatcher, |
| 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 41 virtual ~WebURLLoaderImpl(); | 41 ~WebURLLoaderImpl() override; |
| 42 | 42 |
| 43 static void PopulateURLResponse( | 43 static void PopulateURLResponse( |
| 44 const GURL& url, | 44 const GURL& url, |
| 45 const ResourceResponseInfo& info, | 45 const ResourceResponseInfo& info, |
| 46 blink::WebURLResponse* response); | 46 blink::WebURLResponse* response); |
| 47 | 47 |
| 48 // WebURLLoader methods: | 48 // WebURLLoader methods: |
| 49 virtual void loadSynchronously( | 49 void loadSynchronously( |
| 50 const blink::WebURLRequest& request, | 50 const blink::WebURLRequest& request, |
| 51 blink::WebURLResponse& response, | 51 blink::WebURLResponse& response, |
| 52 blink::WebURLError& error, | 52 blink::WebURLError& error, |
| 53 blink::WebData& data) override; | 53 blink::WebData& data) override; |
| 54 virtual void loadAsynchronously( | 54 void loadAsynchronously( |
| 55 const blink::WebURLRequest& request, | 55 const blink::WebURLRequest& request, |
| 56 blink::WebURLLoaderClient* client) override; | 56 blink::WebURLLoaderClient* client) override; |
| 57 virtual void cancel() override; | 57 void cancel() override; |
| 58 virtual void setDefersLoading(bool value) override; | 58 void setDefersLoading(bool value) override; |
| 59 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority, | 59 void didChangePriority(blink::WebURLRequest::Priority new_priority, |
| 60 int intra_priority_value) override; | 60 int intra_priority_value) override; |
| 61 virtual bool attachThreadedDataReceiver( | 61 bool attachThreadedDataReceiver( |
| 62 blink::WebThreadedDataReceiver* threaded_data_receiver) override; | 62 blink::WebThreadedDataReceiver* threaded_data_receiver) override; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 class Context; | 65 class Context; |
| 66 scoped_refptr<Context> context_; | 66 scoped_refptr<Context> context_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 68 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace content | 71 } // namespace content |
| 72 | 72 |
| 73 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 73 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| OLD | NEW |