| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_PPB_URL_LOADER_PROXY_H_ | 5 #ifndef PPAPI_PPB_URL_LOADER_PROXY_H_ |
| 6 #define PPAPI_PPB_URL_LOADER_PROXY_H_ | 6 #define PPAPI_PPB_URL_LOADER_PROXY_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class PPB_URLLoader_Proxy : public InterfaceProxy { | 24 class PPB_URLLoader_Proxy : public InterfaceProxy { |
| 25 public: | 25 public: |
| 26 PPB_URLLoader_Proxy(Dispatcher* dispatcher, const void* target_interface); | 26 PPB_URLLoader_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 27 virtual ~PPB_URLLoader_Proxy(); | 27 virtual ~PPB_URLLoader_Proxy(); |
| 28 | 28 |
| 29 // URLLoader objects are normally allocated by the Create function, but | 29 // URLLoader objects are normally allocated by the Create function, but |
| 30 // they are also provided to PPP_Instance.OnMsgHandleDocumentLoad. This | 30 // they are also provided to PPP_Instance.OnMsgHandleDocumentLoad. This |
| 31 // function allows the proxy for DocumentLoad to create the correct plugin | 31 // function allows the proxy for DocumentLoad to create the correct plugin |
| 32 // proxied info for the given browser-supplied URLLoader resource ID. | 32 // proxied info for the given browser-supplied URLLoader resource ID. |
| 33 static void TrackPluginResource(PP_Resource url_loader_resource); | 33 static void TrackPluginResource(PP_Instance instance, |
| 34 PP_Resource url_loader_resource); |
| 34 | 35 |
| 35 const PPB_URLLoader* ppb_url_loader_target() const { | 36 const PPB_URLLoader* ppb_url_loader_target() const { |
| 36 return reinterpret_cast<const PPB_URLLoader*>(target_interface()); | 37 return reinterpret_cast<const PPB_URLLoader*>(target_interface()); |
| 37 } | 38 } |
| 38 | 39 |
| 39 // InterfaceProxy implementation. | 40 // InterfaceProxy implementation. |
| 40 virtual const void* GetSourceInterface() const; | 41 virtual const void* GetSourceInterface() const; |
| 41 virtual InterfaceID GetInterfaceId() const; | 42 virtual InterfaceID GetInterfaceId() const; |
| 42 virtual bool OnMessageReceived(const IPC::Message& msg); | 43 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 43 | 44 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 97 |
| 97 private: | 98 private: |
| 98 // Plugin->renderer message handlers. | 99 // Plugin->renderer message handlers. |
| 99 void OnMsgGrantUniversalAccess(PP_Resource loader); | 100 void OnMsgGrantUniversalAccess(PP_Resource loader); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace proxy | 103 } // namespace proxy |
| 103 } // namespace pp | 104 } // namespace pp |
| 104 | 105 |
| 105 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ | 106 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ |
| OLD | NEW |