| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ | 5 #ifndef CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ |
| 6 #define CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ | 6 #define CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/proxy/plugin_resource.h" | 16 #include "ppapi/proxy/plugin_resource.h" |
| 17 #include "ppapi/shared_impl/ppapi_preferences.h" | 17 #include "ppapi/shared_impl/ppapi_preferences.h" |
| 18 #include "ppapi/thunk/ppb_browser_font_trusted_api.h" | 18 #include "ppapi/thunk/ppb_browser_font_trusted_api.h" |
| 19 | 19 |
| 20 class SkCanvas; | 20 class SkCanvas; |
| 21 | 21 |
| 22 namespace WebKit { | 22 namespace blink { |
| 23 class WebFont; | 23 class WebFont; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 class BrowserFontResource_Trusted | 28 class BrowserFontResource_Trusted |
| 29 : public ppapi::proxy::PluginResource, | 29 : public ppapi::proxy::PluginResource, |
| 30 public ppapi::thunk::PPB_BrowserFont_Trusted_API { | 30 public ppapi::thunk::PPB_BrowserFont_Trusted_API { |
| 31 public: | 31 public: |
| 32 BrowserFontResource_Trusted(ppapi::proxy::Connection connection, | 32 BrowserFontResource_Trusted(ppapi::proxy::Connection connection, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // Internal version of DrawTextAt that takes a mapped PlatformCanvas. | 66 // Internal version of DrawTextAt that takes a mapped PlatformCanvas. |
| 67 void DrawTextToCanvas(SkCanvas* destination, | 67 void DrawTextToCanvas(SkCanvas* destination, |
| 68 const PP_BrowserFont_Trusted_TextRun& text, | 68 const PP_BrowserFont_Trusted_TextRun& text, |
| 69 const PP_Point* position, | 69 const PP_Point* position, |
| 70 uint32_t color, | 70 uint32_t color, |
| 71 const PP_Rect* clip, | 71 const PP_Rect* clip, |
| 72 PP_Bool image_data_is_opaque); | 72 PP_Bool image_data_is_opaque); |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 scoped_ptr<WebKit::WebFont> font_; | 75 scoped_ptr<blink::WebFont> font_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(BrowserFontResource_Trusted); | 77 DISALLOW_COPY_AND_ASSIGN(BrowserFontResource_Trusted); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace content | 80 } // namespace content |
| 81 | 81 |
| 82 #endif // CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ | 82 #endif // CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_ |
| OLD | NEW |