Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: ppapi/proxy/ppb_url_response_info_proxy.cc

Issue 7844018: Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_url_response_info_proxy.h ('k') | ppapi/proxy/ppb_url_util_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_url_response_info_proxy.cc
===================================================================
--- ppapi/proxy/ppb_url_response_info_proxy.cc (revision 100753)
+++ ppapi/proxy/ppb_url_response_info_proxy.cc (working copy)
@@ -20,6 +20,15 @@
namespace ppapi {
namespace proxy {
+namespace {
+
+InterfaceProxy* CreateURLResponseInfoProxy(Dispatcher* dispatcher,
+ const void* target_interface) {
+ return new PPB_URLResponseInfo_Proxy(dispatcher, target_interface);
+}
+
+} // namespace
+
// URLResponseInfo -------------------------------------------------------------
class URLResponseInfo : public Resource, public PPB_URLResponseInfo_API {
@@ -71,14 +80,28 @@
// PPB_URLResponseInfo_Proxy ---------------------------------------------------
-PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy(Dispatcher* dispatcher)
- : InterfaceProxy(dispatcher) {
+PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy(
+ Dispatcher* dispatcher,
+ const void* target_interface)
+ : InterfaceProxy(dispatcher, target_interface) {
}
PPB_URLResponseInfo_Proxy::~PPB_URLResponseInfo_Proxy() {
}
// static
+const InterfaceProxy::Info* PPB_URLResponseInfo_Proxy::GetInfo() {
+ static const Info info = {
+ ppapi::thunk::GetPPB_URLResponseInfo_Thunk(),
+ PPB_URLRESPONSEINFO_INTERFACE,
+ INTERFACE_ID_PPB_URL_RESPONSE_INFO,
+ false,
+ &CreateURLResponseInfoProxy,
+ };
+ return &info;
+}
+
+// static
PP_Resource PPB_URLResponseInfo_Proxy::CreateResponseForResource(
const HostResource& resource) {
return (new URLResponseInfo(resource))->GetReference();
@@ -119,8 +142,10 @@
file_ref = enter.object()->GetBodyAsFileRef();
// Use the FileRef proxy to serialize.
+ DCHECK(!dispatcher()->IsPlugin());
+ HostDispatcher* host_disp = static_cast<HostDispatcher*>(dispatcher());
PPB_FileRef_Proxy* file_ref_proxy = static_cast<PPB_FileRef_Proxy*>(
- dispatcher()->GetInterfaceProxy(INTERFACE_ID_PPB_FILE_REF));
+ host_disp->GetOrCreatePPBInterfaceProxy(INTERFACE_ID_PPB_FILE_REF));
file_ref_proxy->SerializeFileRef(file_ref, result);
}
« no previous file with comments | « ppapi/proxy/ppb_url_response_info_proxy.h ('k') | ppapi/proxy/ppb_url_util_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698