| 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 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_font_impl.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_font_dev.h" | 7 #include "ppapi/c/dev/ppb_font_dev.h" |
| 8 #include "ppapi/shared_impl/font_impl.h" | 8 #include "ppapi/shared_impl/font_impl.h" |
| 9 #include "ppapi/shared_impl/ppapi_preferences.h" | 9 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 10 #include "ppapi/shared_impl/var.h" | 10 #include "ppapi/shared_impl/var.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 PP_Bool result = PP_FALSE; | 79 PP_Bool result = PP_FALSE; |
| 80 font_forwarding_->Describe(NULL, description, &face, metrics, &result); | 80 font_forwarding_->Describe(NULL, description, &face, metrics, &result); |
| 81 if (!result) | 81 if (!result) |
| 82 return PP_FALSE; | 82 return PP_FALSE; |
| 83 | 83 |
| 84 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); | 84 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); |
| 85 if (!plugin_module) | 85 if (!plugin_module) |
| 86 return PP_FALSE; | 86 return PP_FALSE; |
| 87 | 87 |
| 88 // Convert the string. | 88 // Convert the string. |
| 89 description->face = StringVar::StringToPPVar(plugin_module->pp_module(), | 89 description->face = StringVar::StringToPPVar(face); |
| 90 face); | |
| 91 return PP_TRUE; | 90 return PP_TRUE; |
| 92 } | 91 } |
| 93 | 92 |
| 94 PP_Bool PPB_Font_Impl::DrawTextAt(PP_Resource image_data, | 93 PP_Bool PPB_Font_Impl::DrawTextAt(PP_Resource image_data, |
| 95 const PP_TextRun_Dev* text, | 94 const PP_TextRun_Dev* text, |
| 96 const PP_Point* position, | 95 const PP_Point* position, |
| 97 uint32_t color, | 96 uint32_t color, |
| 98 const PP_Rect* clip, | 97 const PP_Rect* clip, |
| 99 PP_Bool image_data_is_opaque) { | 98 PP_Bool image_data_is_opaque) { |
| 100 // Get and map the image data we're painting to. | 99 // Get and map the image data we're painting to. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 return this; | 158 return this; |
| 160 } | 159 } |
| 161 | 160 |
| 162 PP_Var PPB_Font_FunctionImpl::GetFontFamilies(PP_Instance instance) { | 161 PP_Var PPB_Font_FunctionImpl::GetFontFamilies(PP_Instance instance) { |
| 163 return PP_MakeUndefined(); | 162 return PP_MakeUndefined(); |
| 164 } | 163 } |
| 165 | 164 |
| 166 } // namespace ppapi | 165 } // namespace ppapi |
| 167 } // namespace webkit | 166 } // namespace webkit |
| 168 | 167 |
| OLD | NEW |