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

Unified Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7006022: Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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/resource_creation_proxy.h ('k') | ppapi/shared_impl/audio_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/resource_creation_proxy.cc
===================================================================
--- ppapi/proxy/resource_creation_proxy.cc (revision 87436)
+++ ppapi/proxy/resource_creation_proxy.cc (working copy)
@@ -16,9 +16,6 @@
#include "ppapi/proxy/ppb_audio_proxy.h"
#include "ppapi/proxy/ppb_buffer_proxy.h"
#include "ppapi/proxy/ppb_broker_proxy.h"
-#include "ppapi/proxy/ppb_file_chooser_proxy.h"
-#include "ppapi/proxy/ppb_file_ref_proxy.h"
-#include "ppapi/proxy/ppb_file_system_proxy.h"
#include "ppapi/proxy/ppb_font_proxy.h"
#include "ppapi/proxy/ppb_graphics_2d_proxy.h"
#include "ppapi/proxy/ppb_image_data_proxy.h"
@@ -40,7 +37,7 @@
}
::ppapi::thunk::ResourceCreationAPI*
-ResourceCreationProxy::AsResourceCreationAPI() {
+ResourceCreationProxy::AsResourceCreation() {
return this;
}
@@ -75,34 +72,6 @@
return PPB_Buffer_Proxy::CreateProxyResource(instance, size);
}
-PP_Resource ResourceCreationProxy::CreateDirectoryReader(
- PP_Resource directory_ref) {
- // Not proxied yet.
- return 0;
-}
-
-PP_Resource ResourceCreationProxy::CreateFileChooser(
- PP_Instance instance,
- const PP_FileChooserOptions_Dev* options) {
- return PPB_FileChooser_Proxy::CreateProxyResource(instance, options);
-}
-
-PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
- // Not proxied yet.
- return 0;
-}
-
-PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system,
- const char* path) {
- return PPB_FileRef_Proxy::CreateProxyResource(file_system, path);
-}
-
-PP_Resource ResourceCreationProxy::CreateFileSystem(
- PP_Instance instance,
- PP_FileSystemType_Dev type) {
- return PPB_FileSystem_Proxy::CreateProxyResource(instance, type);
-}
-
PP_Resource ResourceCreationProxy::CreateFontObject(
PP_Instance instance,
const PP_FontDescription_Dev* description) {
@@ -114,11 +83,22 @@
return PluginResourceTracker::GetInstance()->AddResource(object);
}
-PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
+PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance pp_instance,
const PP_Size& size,
PP_Bool is_always_opaque) {
- return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size,
- is_always_opaque);
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(pp_instance);
+ if (!dispatcher)
+ return PP_ERROR_BADARGUMENT;
+
+ HostResource result;
+ dispatcher->Send(new PpapiHostMsg_ResourceCreation_Graphics2D(
+ INTERFACE_ID_RESOURCE_CREATION, pp_instance, size, is_always_opaque,
+ &result));
+ if (result.is_null())
+ return 0;
+ linked_ptr<Graphics2D> graphics_2d(new Graphics2D(result, size,
+ is_always_opaque));
+ return PluginResourceTracker::GetInstance()->AddResource(graphics_2d);
}
PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance,
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/audio_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698