diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 00:26:43 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 00:26:43 +0000 |
commit | 4614f1974881ecfd0a0118683bac628c6128c2a9 (patch) | |
tree | c69836459560dd8003f7e18ca554f2e1d7f79b4d /ppapi/c/dev | |
parent | b8e6654fb91108033580f510e2d411093936fc2f (diff) | |
download | chromium_src-4614f1974881ecfd0a0118683bac628c6128c2a9.zip chromium_src-4614f1974881ecfd0a0118683bac628c6128c2a9.tar.gz chromium_src-4614f1974881ecfd0a0118683bac628c6128c2a9.tar.bz2 |
First pass at making the proxy handle multiple renderers. This associates the
instance with resources and has most callers retrieve the dispatcher
according to the appropriate instance. This isn't hooked up to anything yet.
This changes some PPB_Flash interface methods to use PP_Bool.
The most challenging part of the change is in the plugin_var_tracker which
now needs to track which dispatcher each var object came from, and remap var
IDs since each renderer will be generating var IDs in its own space, which
will likely overlap. A similar system will need to be done for resources
which is not implemented yet.
I added some null checks in audio_impl because audio_ can be NULL in some
cases when using the trusted API. I discovered this when testing NaCl for
this patch.
Review URL: http://codereview.chromium.org/6282007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/dev')
-rw-r--r-- | ppapi/c/dev/ppb_font_dev.h | 8 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_testing_dev.h | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/ppapi/c/dev/ppb_font_dev.h b/ppapi/c/dev/ppb_font_dev.h index e2bba3c..e15c11d 100644 --- a/ppapi/c/dev/ppb_font_dev.h +++ b/ppapi/c/dev/ppb_font_dev.h @@ -155,19 +155,23 @@ struct PPB_Font_Dev { // Note that this function handles complex scripts such as Arabic, combining // accents, etc. so that adding the width of substrings won't necessarily // produce the correct width of the entire string. + // + // Returns -1 on failure. int32_t (*MeasureText)(PP_Resource font, const struct PP_TextRun_Dev* text); // Returns the character at the given pixel X position from the beginning of // the string. This handles complex scripts such as Arabic, where characters - // may be combined or replaced depending on the context. + // may be combined or replaced depending on the context. Returns (uint32)-1 + // on failure. uint32_t (*CharacterOffsetForPixel)(PP_Resource font, const struct PP_TextRun_Dev* text, int32_t pixel_position); // Returns the horizontal advance to the given character if the string was // placed at the given position. This handles complex scripts such as Arabic, - // where characters may be combined or replaced depending on context. + // where characters may be combined or replaced depending on context. Returns + // -1 on error. int32_t (*PixelOffsetForCharacter)(PP_Resource font, const struct PP_TextRun_Dev* text, uint32_t char_offset); diff --git a/ppapi/c/dev/ppb_testing_dev.h b/ppapi/c/dev/ppb_testing_dev.h index 7383a65..30c004c1 100644 --- a/ppapi/c/dev/ppb_testing_dev.h +++ b/ppapi/c/dev/ppb_testing_dev.h @@ -6,13 +6,13 @@ #define PPAPI_C_DEV_PPB_TESTING_DEV_H_ #include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" struct PP_Point; -#define PPB_TESTING_DEV_INTERFACE "PPB_Testing(Dev);0.4" +#define PPB_TESTING_DEV_INTERFACE "PPB_Testing(Dev);0.5" // This interface contains functions used for unit testing. Do not use in // production code. They are not guaranteed to be available in normal plugin @@ -64,8 +64,9 @@ struct PPB_Testing_Dev { void (*QuitMessageLoop)(); // Returns the number of live objects (resources + strings + objects) - // associated with this plugin module. Used for detecting leaks. - uint32_t (*GetLiveObjectCount)(PP_Module module); + // associated with this plugin instance. Used for detecting leaks. Returns + // (uint32_t)-1 on failure. + uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); }; #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ |