diff options
Diffstat (limited to 'ppapi/shared_impl/webkit_forwarding.h')
-rw-r--r-- | ppapi/shared_impl/webkit_forwarding.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/ppapi/shared_impl/webkit_forwarding.h b/ppapi/shared_impl/webkit_forwarding.h index 2bef621..d571aaa 100644 --- a/ppapi/shared_impl/webkit_forwarding.h +++ b/ppapi/shared_impl/webkit_forwarding.h @@ -16,6 +16,10 @@ struct PP_FontMetrics_Dev; struct PP_Point; struct PP_Rect; +namespace base { +class WaitableEvent; +} + namespace skia { class PlatformCanvas; } @@ -63,22 +67,37 @@ class PPAPI_SHARED_EXPORT WebKitForwarding { // on creating vars. Instead, the face name is placed into the given // string. See class description for waitable_event documentation. If // non-null, the given event will be set on completion. - virtual void Describe(PP_FontDescription_Dev* description, + virtual void Describe(base::WaitableEvent* event, + PP_FontDescription_Dev* description, std::string* face, PP_FontMetrics_Dev* metrics, PP_Bool* result) = 0; - virtual void DrawTextAt(const DrawTextParams& params) = 0; - virtual void MeasureText(const TextRun& text, + virtual void DrawTextAt(base::WaitableEvent* event, + const DrawTextParams& params) = 0; + virtual void MeasureText(base::WaitableEvent* event, + const TextRun& text, int32_t* result) = 0; - virtual void CharacterOffsetForPixel(const TextRun& text, + virtual void CharacterOffsetForPixel(base::WaitableEvent* event, + const TextRun& text, int32_t pixel_position, uint32_t* result) = 0; - virtual void PixelOffsetForCharacter(const TextRun& text, + virtual void PixelOffsetForCharacter(base::WaitableEvent* event, + const TextRun& text, uint32_t char_offset, int32_t* result) = 0; }; virtual ~WebKitForwarding(); + + // Creates a new font with the given description. The desc_face is the face + // name already extracted from the description. The caller owns the result + // pointer, which will never be NULL. If non-null, the given event will be + // set on completion. + virtual void CreateFontForwarding(base::WaitableEvent* event, + const PP_FontDescription_Dev& desc, + const std::string& desc_face, + const Preferences& prefs, + Font** result) = 0; }; } // namespace ppapi |