| 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_PROXY_PPB_FONT_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FONT_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_FONT_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FONT_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "ppapi/proxy/host_resource.h" | |
| 11 #include "ppapi/proxy/interface_proxy.h" | 10 #include "ppapi/proxy/interface_proxy.h" |
| 12 #include "ppapi/proxy/plugin_resource.h" | 11 #include "ppapi/proxy/plugin_resource.h" |
| 12 #include "ppapi/shared_impl/host_resource.h" |
| 13 #include "ppapi/shared_impl/webkit_forwarding.h" | 13 #include "ppapi/shared_impl/webkit_forwarding.h" |
| 14 #include "ppapi/thunk/ppb_font_api.h" | 14 #include "ppapi/thunk/ppb_font_api.h" |
| 15 | 15 |
| 16 struct PPB_Font_Dev; | 16 struct PPB_Font_Dev; |
| 17 | 17 |
| 18 namespace pp { | 18 namespace pp { |
| 19 namespace proxy { | 19 namespace proxy { |
| 20 | 20 |
| 21 class SerializedVarReturnValue; | 21 class SerializedVarReturnValue; |
| 22 | 22 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class Font : public PluginResource, | 45 class Font : public PluginResource, |
| 46 public ppapi::thunk::PPB_Font_API { | 46 public ppapi::thunk::PPB_Font_API { |
| 47 public: | 47 public: |
| 48 // Note that there isn't a "real" resource in the renderer backing a font, | 48 // Note that there isn't a "real" resource in the renderer backing a font, |
| 49 // it lives entirely in the plugin process. So the resource ID in the host | 49 // it lives entirely in the plugin process. So the resource ID in the host |
| 50 // resource should be 0. However, various code assumes the instance in the | 50 // resource should be 0. However, various code assumes the instance in the |
| 51 // host resource is valid (this is how resources are associated with | 51 // host resource is valid (this is how resources are associated with |
| 52 // instances), so that should be set. | 52 // instances), so that should be set. |
| 53 Font(const HostResource& resource, const PP_FontDescription_Dev& desc); | 53 Font(const ppapi::HostResource& resource, const PP_FontDescription_Dev& desc); |
| 54 virtual ~Font(); | 54 virtual ~Font(); |
| 55 | 55 |
| 56 // ResourceObjectBase. | 56 // ResourceObjectBase. |
| 57 virtual ppapi::thunk::PPB_Font_API* AsPPB_Font_API() OVERRIDE; | 57 virtual ppapi::thunk::PPB_Font_API* AsPPB_Font_API() OVERRIDE; |
| 58 | 58 |
| 59 // PPB_Font_API implementation. | 59 // PPB_Font_API implementation. |
| 60 virtual PP_Bool Describe(PP_FontDescription_Dev* description, | 60 virtual PP_Bool Describe(PP_FontDescription_Dev* description, |
| 61 PP_FontMetrics_Dev* metrics) OVERRIDE; | 61 PP_FontMetrics_Dev* metrics) OVERRIDE; |
| 62 virtual PP_Bool DrawTextAt(PP_Resource image_data, | 62 virtual PP_Bool DrawTextAt(PP_Resource image_data, |
| 63 const PP_TextRun_Dev* text, | 63 const PP_TextRun_Dev* text, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 scoped_ptr<ppapi::WebKitForwarding::Font> font_forwarding_; | 81 scoped_ptr<ppapi::WebKitForwarding::Font> font_forwarding_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(Font); | 83 DISALLOW_COPY_AND_ASSIGN(Font); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace proxy | 86 } // namespace proxy |
| 87 } // namespace pp | 87 } // namespace pp |
| 88 | 88 |
| 89 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ | 89 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ |
| OLD | NEW |