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

Unified Diff: ppapi/proxy/ppb_testing_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_testing_proxy.h ('k') | ppapi/proxy/ppb_url_loader_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_testing_proxy.cc
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index 564f68f5d8bbc734ee084ca2449a46077ba6cc17..836e1cfbbe3b5d459babadc19c09d56d33dc33e3 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -75,16 +75,19 @@ const PPB_Testing_Dev testing_interface = {
&IsOutOfProcess
};
-InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher,
- const void* target_interface) {
- return new PPB_Testing_Proxy(dispatcher, target_interface);
+InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher) {
+ return new PPB_Testing_Proxy(dispatcher);
}
} // namespace
-PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher,
- const void* target_interface)
- : InterfaceProxy(dispatcher, target_interface) {
+PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher)
+ : InterfaceProxy(dispatcher),
+ ppb_testing_impl_(NULL) {
+ if (!dispatcher->IsPlugin()) {
+ ppb_testing_impl_ = static_cast<const PPB_Testing_Dev*>(
+ dispatcher->local_get_interface()(PPB_TESTING_DEV_INTERFACE));
+ }
}
PPB_Testing_Proxy::~PPB_Testing_Proxy() {
@@ -119,21 +122,21 @@ void PPB_Testing_Proxy::OnMsgReadImageData(
const HostResource& image,
const PP_Point& top_left,
PP_Bool* result) {
- *result = ppb_testing_target()->ReadImageData(
+ *result = ppb_testing_impl_->ReadImageData(
device_context_2d.host_resource(), image.host_resource(), &top_left);
}
void PPB_Testing_Proxy::OnMsgRunMessageLoop(PP_Instance instance) {
- ppb_testing_target()->RunMessageLoop(instance);
+ ppb_testing_impl_->RunMessageLoop(instance);
}
void PPB_Testing_Proxy::OnMsgQuitMessageLoop(PP_Instance instance) {
- ppb_testing_target()->QuitMessageLoop(instance);
+ ppb_testing_impl_->QuitMessageLoop(instance);
}
void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance,
uint32_t* result) {
- *result = ppb_testing_target()->GetLiveObjectsForInstance(instance);
+ *result = ppb_testing_impl_->GetLiveObjectsForInstance(instance);
}
} // namespace proxy
« no previous file with comments | « ppapi/proxy/ppb_testing_proxy.h ('k') | ppapi/proxy/ppb_url_loader_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698