| 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 "ppapi/proxy/ppb_font_proxy.h" | 5 #include "ppapi/proxy/ppb_font_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ppapi/c/dev/ppb_font_dev.h" | 8 #include "ppapi/c/dev/ppb_font_dev.h" |
| 9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
| 10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 bool PPTextRunToTextRun(const PP_TextRun_Dev* run, | 28 bool PPTextRunToTextRun(const PP_TextRun_Dev* run, |
| 29 WebKitForwarding::Font::TextRun* output) { | 29 WebKitForwarding::Font::TextRun* output) { |
| 30 const std::string* str = PluginVarTracker::GetInstance()->GetExistingString( | 30 const std::string* str = PluginVarTracker::GetInstance()->GetExistingString( |
| 31 run->text); | 31 run->text); |
| 32 if (!str) | 32 if (!str) |
| 33 return false; | 33 return false; |
| 34 | 34 |
| 35 output->text = *str; | 35 output->text = *str; |
| 36 output->rtl = PPBoolToBool(run->rtl); | 36 output->rtl = PP_ToBool(run->rtl); |
| 37 output->override_direction = PPBoolToBool(run->override_direction); | 37 output->override_direction = PP_ToBool(run->override_direction); |
| 38 return true; | 38 return true; |
| 39 } | 39 } |
| 40 | 40 |
| 41 InterfaceProxy* CreateFontProxy(Dispatcher* dispatcher, | 41 InterfaceProxy* CreateFontProxy(Dispatcher* dispatcher, |
| 42 const void* target_interface) { | 42 const void* target_interface) { |
| 43 return new PPB_Font_Proxy(dispatcher, target_interface); | 43 return new PPB_Font_Proxy(dispatcher, target_interface); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 return result; | 217 return result; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void Font::RunOnWebKitThread(const base::Closure& task) { | 220 void Font::RunOnWebKitThread(const base::Closure& task) { |
| 221 GetDispatcher()->PostToWebKitThread(FROM_HERE, task); | 221 GetDispatcher()->PostToWebKitThread(FROM_HERE, task); |
| 222 webkit_event_.Wait(); | 222 webkit_event_.Wait(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace proxy | 225 } // namespace proxy |
| 226 } // namespace pp | 226 } // namespace pp |
| OLD | NEW |