| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "ppapi/host/resource_host.h" | 13 #include "ppapi/host/resource_host.h" |
| 14 #include "ppapi/proxy/resource_message_params.h" | 14 #include "ppapi/proxy/resource_message_params.h" |
| 15 #include "ppapi/shared_impl/url_request_info_data.h" | 15 #include "ppapi/shared_impl/url_request_info_data.h" |
| 16 #include "ppapi/shared_impl/url_response_info_data.h" | 16 #include "ppapi/shared_impl/url_response_info_data.h" |
| 17 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 17 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 class WebFrame; | 20 class WebFrame; |
| 21 class WebURLLoader; | 21 class WebURLLoader; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class RendererPpapiHostImpl; | 26 class RendererPpapiHostImpl; |
| 27 | 27 |
| 28 class PepperURLLoaderHost | 28 class PepperURLLoaderHost : public ppapi::host::ResourceHost, |
| 29 : public ppapi::host::ResourceHost, | 29 public blink::WebURLLoaderClient { |
| 30 public blink::WebURLLoaderClient { | |
| 31 public: | 30 public: |
| 32 // If main_document_loader is true, PP_Resource must be 0 since it will be | 31 // If main_document_loader is true, PP_Resource must be 0 since it will be |
| 33 // pending until the plugin resource attaches to it. | 32 // pending until the plugin resource attaches to it. |
| 34 PepperURLLoaderHost(RendererPpapiHostImpl* host, | 33 PepperURLLoaderHost(RendererPpapiHostImpl* host, |
| 35 bool main_document_loader, | 34 bool main_document_loader, |
| 36 PP_Instance instance, | 35 PP_Instance instance, |
| 37 PP_Resource resource); | 36 PP_Resource resource); |
| 38 virtual ~PepperURLLoaderHost(); | 37 virtual ~PepperURLLoaderHost(); |
| 39 | 38 |
| 40 // ResourceHost implementation. | 39 // ResourceHost implementation. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 bool pending_response_; | 148 bool pending_response_; |
| 150 | 149 |
| 151 base::WeakPtrFactory<PepperURLLoaderHost> weak_factory_; | 150 base::WeakPtrFactory<PepperURLLoaderHost> weak_factory_; |
| 152 | 151 |
| 153 DISALLOW_COPY_AND_ASSIGN(PepperURLLoaderHost); | 152 DISALLOW_COPY_AND_ASSIGN(PepperURLLoaderHost); |
| 154 }; | 153 }; |
| 155 | 154 |
| 156 } // namespace content | 155 } // namespace content |
| 157 | 156 |
| 158 #endif // CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 157 #endif // CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
| OLD | NEW |