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

Side by Side Diff: ppapi/shared_impl/webkit_forwarding.h

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/private/ppb_font_shared.cc ('k') | ppapi/thunk/ppb_font_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_ 5 #ifndef PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_
6 #define PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_ 6 #define PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ppapi/c/pp_bool.h" 10 #include "ppapi/c/pp_bool.h"
11 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/ppapi_shared_export.h" 12 #include "ppapi/shared_impl/ppapi_shared_export.h"
13 13
14 struct PP_FontDescription_Dev; 14 struct PP_FontDescription_Dev;
15 struct PP_FontMetrics_Dev; 15 struct PP_FontMetrics_Dev;
16 struct PP_Point; 16 struct PP_Point;
17 struct PP_Rect; 17 struct PP_Rect;
18 18
19 namespace base {
20 class WaitableEvent;
21 }
22
23 namespace skia { 19 namespace skia {
24 class PlatformCanvas; 20 class PlatformCanvas;
25 } 21 }
26 22
27 namespace ppapi { 23 namespace ppapi {
28 24
29 struct Preferences; 25 struct Preferences;
30 26
31 class PPAPI_SHARED_EXPORT WebKitForwarding { 27 class PPAPI_SHARED_EXPORT WebKitForwarding {
32 public: 28 public:
(...skipping 27 matching lines...) Expand all
60 const PP_Rect* clip; 56 const PP_Rect* clip;
61 PP_Bool image_data_is_opaque; 57 PP_Bool image_data_is_opaque;
62 }; 58 };
63 59
64 virtual ~Font(); 60 virtual ~Font();
65 61
66 // The face name in the description is not filled in to avoid a dependency 62 // The face name in the description is not filled in to avoid a dependency
67 // on creating vars. Instead, the face name is placed into the given 63 // on creating vars. Instead, the face name is placed into the given
68 // string. See class description for waitable_event documentation. If 64 // string. See class description for waitable_event documentation. If
69 // non-null, the given event will be set on completion. 65 // non-null, the given event will be set on completion.
70 virtual void Describe(base::WaitableEvent* event, 66 virtual void Describe(PP_FontDescription_Dev* description,
71 PP_FontDescription_Dev* description,
72 std::string* face, 67 std::string* face,
73 PP_FontMetrics_Dev* metrics, 68 PP_FontMetrics_Dev* metrics,
74 PP_Bool* result) = 0; 69 PP_Bool* result) = 0;
75 virtual void DrawTextAt(base::WaitableEvent* event, 70 virtual void DrawTextAt(const DrawTextParams& params) = 0;
76 const DrawTextParams& params) = 0; 71 virtual void MeasureText(const TextRun& text,
77 virtual void MeasureText(base::WaitableEvent* event,
78 const TextRun& text,
79 int32_t* result) = 0; 72 int32_t* result) = 0;
80 virtual void CharacterOffsetForPixel(base::WaitableEvent* event, 73 virtual void CharacterOffsetForPixel(const TextRun& text,
81 const TextRun& text,
82 int32_t pixel_position, 74 int32_t pixel_position,
83 uint32_t* result) = 0; 75 uint32_t* result) = 0;
84 virtual void PixelOffsetForCharacter(base::WaitableEvent* event, 76 virtual void PixelOffsetForCharacter(const TextRun& text,
85 const TextRun& text,
86 uint32_t char_offset, 77 uint32_t char_offset,
87 int32_t* result) = 0; 78 int32_t* result) = 0;
88 }; 79 };
89 80
90 virtual ~WebKitForwarding(); 81 virtual ~WebKitForwarding();
91
92 // Creates a new font with the given description. The desc_face is the face
93 // name already extracted from the description. The caller owns the result
94 // pointer, which will never be NULL. If non-null, the given event will be
95 // set on completion.
96 virtual void CreateFontForwarding(base::WaitableEvent* event,
97 const PP_FontDescription_Dev& desc,
98 const std::string& desc_face,
99 const Preferences& prefs,
100 Font** result) = 0;
101 }; 82 };
102 83
103 } // namespace ppapi 84 } // namespace ppapi
104 85
105 #endif // PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_ 86 #endif // PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/private/ppb_font_shared.cc ('k') | ppapi/thunk/ppb_font_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698