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

Unified Diff: ppapi/proxy/ppb_url_response_info_proxy.cc

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch 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
diff --git a/ppapi/proxy/ppb_url_response_info_proxy.cc b/ppapi/proxy/ppb_url_response_info_proxy.cc
index 3801e5fd954cc15b4af9d32b7266a3a5690a6de2..ace317c3a573bc768b3d321073dc4398e0af7f28 100644
--- a/ppapi/proxy/ppb_url_response_info_proxy.cc
+++ b/ppapi/proxy/ppb_url_response_info_proxy.cc
@@ -20,15 +20,6 @@ using ppapi::thunk::PPB_URLResponseInfo_API;
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 {
@@ -80,28 +71,14 @@ PP_Resource URLResponseInfo::GetBodyAsFileRef() {
// PPB_URLResponseInfo_Proxy ---------------------------------------------------
-PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy(
- Dispatcher* dispatcher,
- const void* target_interface)
- : InterfaceProxy(dispatcher, target_interface) {
+PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy(Dispatcher* dispatcher)
+ : InterfaceProxy(dispatcher) {
}
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();
@@ -142,10 +119,8 @@ void PPB_URLResponseInfo_Proxy::OnMsgGetBodyAsFileRef(
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*>(
- host_disp->GetOrCreatePPBInterfaceProxy(INTERFACE_ID_PPB_FILE_REF));
+ dispatcher()->GetInterfaceProxy(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