| OLD | NEW |
| 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 | 12 |
| 13 struct PP_FontDescription_Dev; | 13 struct PP_FontDescription_Dev; |
| 14 struct PP_FontMetrics_Dev; | 14 struct PP_FontMetrics_Dev; |
| 15 struct PP_Point; | 15 struct PP_Point; |
| 16 struct PP_Rect; | 16 struct PP_Rect; |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class WaitableEvent; | 19 class WaitableEvent; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace skia { | 22 namespace skia { |
| 23 class PlatformCanvas; | 23 class PlatformCanvas; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ppapi { | 26 namespace ppapi { |
| 27 | 27 |
| 28 struct Preferences; |
| 29 |
| 28 class WebKitForwarding { | 30 class WebKitForwarding { |
| 29 public: | 31 public: |
| 30 class Font { | 32 class Font { |
| 31 public: | 33 public: |
| 32 // C++ version of PP_TextRun_Dev. Since the functions below will be called | 34 // C++ version of PP_TextRun_Dev. Since the functions below will be called |
| 33 // on an alternate thread in the proxy, and since there are different | 35 // on an alternate thread in the proxy, and since there are different |
| 34 // methods of converting PP_Var -> strings in the plugin and the proxy, we | 36 // methods of converting PP_Var -> strings in the plugin and the proxy, we |
| 35 // can't use PP_Vars in the Do* functions below. | 37 // can't use PP_Vars in the Do* functions below. |
| 36 struct TextRun { | 38 struct TextRun { |
| 37 std::string text; | 39 std::string text; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 88 |
| 87 virtual ~WebKitForwarding(); | 89 virtual ~WebKitForwarding(); |
| 88 | 90 |
| 89 // Creates a new font with the given description. The desc_face is the face | 91 // Creates a new font with the given description. The desc_face is the face |
| 90 // name already extracted from the description. The caller owns the result | 92 // name already extracted from the description. The caller owns the result |
| 91 // pointer, which will never be NULL. If non-null, the given event will be | 93 // pointer, which will never be NULL. If non-null, the given event will be |
| 92 // set on completion. | 94 // set on completion. |
| 93 virtual void CreateFontForwarding(base::WaitableEvent* event, | 95 virtual void CreateFontForwarding(base::WaitableEvent* event, |
| 94 const PP_FontDescription_Dev& desc, | 96 const PP_FontDescription_Dev& desc, |
| 95 const std::string& desc_face, | 97 const std::string& desc_face, |
| 98 const Preferences& prefs, |
| 96 Font** result) = 0; | 99 Font** result) = 0; |
| 97 | |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 } // namespace ppapi | 102 } // namespace ppapi |
| 101 | 103 |
| 102 #endif // PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_ | 104 #endif // PPAPI_SHARED_IMPL_WEBKIT_FORWARDING_H_ |
| OLD | NEW |