| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 class NSFont; | 39 class NSFont; |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 namespace WebKit { | 42 namespace WebKit { |
| 43 | 43 |
| 44 // Put methods here that are required due to sandbox restrictions. | 44 // Put methods here that are required due to sandbox restrictions. |
| 45 class WebSandboxSupport { | 45 class WebSandboxSupport { |
| 46 public: | 46 public: |
| 47 // Given an input font - |srcFont| [which can't be loaded due to sandbox | 47 // Given an input font - |srcFont| [which can't be loaded due to sandbox |
| 48 // restrictions]. Return a font container belonging to an equivalent | 48 // restrictions]. Return a font container belonging to an equivalent |
| 49 // font file that can be used to access the font. | 49 // font file that can be used to access the font and a unique identifier |
| 50 // corresponding to the on-disk font file. |
| 50 // | 51 // |
| 51 // Note that a font container may contain multiple fonts, the caller is | 52 // Note that a font container may contain multiple fonts, the caller is |
| 52 // responsible for retreiving the appropriate font from the container. | 53 // responsible for retreiving the appropriate font from the container. |
| 53 // | 54 // |
| 54 // If this function succeeds, the caller assumes ownership of the |out| | 55 // If this function succeeds, the caller assumes ownership of the |out| |
| 55 // parameter and must call ATSFontDeactivate() to unload it when done. | 56 // parameter and must call ATSFontDeactivate() to unload it when done. |
| 56 // | 57 // |
| 57 // Returns: true on success, false on error. | 58 // Returns: true on success, false on error. |
| 58 virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out) = 0; | 59 virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef*, uint32_t* fontI
D) = 0; |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace WebKit | 62 } // namespace WebKit |
| 62 | 63 |
| 63 #endif | 64 #endif |
| OLD | NEW |