OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" | 13 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
| 14 #include "ppapi/shared_impl/resource.h" |
14 #include "ppapi/thunk/ppb_url_loader_api.h" | 15 #include "ppapi/thunk/ppb_url_loader_api.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" |
16 #include "webkit/plugins/ppapi/callbacks.h" | 17 #include "webkit/plugins/ppapi/callbacks.h" |
17 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
18 #include "webkit/plugins/ppapi/resource.h" | |
19 | 19 |
20 namespace WebKit { | 20 namespace WebKit { |
21 class WebFrame; | 21 class WebFrame; |
22 class WebURL; | 22 class WebURL; |
23 } | 23 } |
24 | 24 |
25 namespace webkit { | 25 namespace webkit { |
26 namespace ppapi { | 26 namespace ppapi { |
27 | 27 |
28 class PluginInstance; | |
29 class PPB_URLRequestInfo_Impl; | 28 class PPB_URLRequestInfo_Impl; |
30 class PPB_URLResponseInfo_Impl; | 29 class PPB_URLResponseInfo_Impl; |
31 | 30 |
32 class PPB_URLLoader_Impl : public Resource, | 31 class PPB_URLLoader_Impl : public ::ppapi::Resource, |
33 public ::ppapi::thunk::PPB_URLLoader_API, | 32 public ::ppapi::thunk::PPB_URLLoader_API, |
34 public WebKit::WebURLLoaderClient { | 33 public WebKit::WebURLLoaderClient { |
35 public: | 34 public: |
36 PPB_URLLoader_Impl(PluginInstance* instance, bool main_document_loader); | 35 PPB_URLLoader_Impl(PP_Instance instance, bool main_document_loader); |
37 virtual ~PPB_URLLoader_Impl(); | 36 virtual ~PPB_URLLoader_Impl(); |
38 | 37 |
39 // Resource overrides. | 38 // Resource overrides. |
40 virtual ::ppapi::thunk::PPB_URLLoader_API* AsPPB_URLLoader_API() OVERRIDE; | 39 virtual ::ppapi::thunk::PPB_URLLoader_API* AsPPB_URLLoader_API() OVERRIDE; |
41 virtual void InstanceWasDeleted() OVERRIDE; | 40 virtual void InstanceWasDeleted() OVERRIDE; |
42 | 41 |
43 // PPB_URLLoader_API implementation. | 42 // PPB_URLLoader_API implementation. |
44 virtual int32_t Open(PP_Resource request_id, | 43 virtual int32_t Open(PP_Resource request_id, |
45 PP_CompletionCallback callback) OVERRIDE; | 44 PP_CompletionCallback callback) OVERRIDE; |
46 virtual int32_t FollowRedirect(PP_CompletionCallback callback) OVERRIDE; | 45 virtual int32_t FollowRedirect(PP_CompletionCallback callback) OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 140 |
142 PP_URLLoaderTrusted_StatusCallback status_callback_; | 141 PP_URLLoaderTrusted_StatusCallback status_callback_; |
143 | 142 |
144 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); | 143 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); |
145 }; | 144 }; |
146 | 145 |
147 } // namespace ppapi | 146 } // namespace ppapi |
148 } // namespace webkit | 147 } // namespace webkit |
149 | 148 |
150 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 149 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
OLD | NEW |