| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 DCHECK(!isLoaded()); | 183 DCHECK(!isLoaded()); |
| 184 ResourceClientWalker<FontResourceClient> walker(clients()); | 184 ResourceClientWalker<FontResourceClient> walker(clients()); |
| 185 while (FontResourceClient* client = walker.next()) { | 185 while (FontResourceClient* client = walker.next()) { |
| 186 if (!client->isLowPriorityLoadingAllowedForRemoteFont()) { | 186 if (!client->isLowPriorityLoadingAllowedForRemoteFont()) { |
| 187 return false; | 187 return false; |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void FontResource::onMemoryDump(WebMemoryDumpLevelOfDetail level, |
| 194 WebProcessMemoryDump* memoryDump) const { |
| 195 Resource::onMemoryDump(level, memoryDump); |
| 196 if (!m_fontData) |
| 197 return; |
| 198 const String name = getMemoryDumpName() + "/decoded_webfont"; |
| 199 WebMemoryAllocatorDump* dump = memoryDump->createMemoryAllocatorDump(name); |
| 200 dump->addScalar("size", "bytes", m_fontData->dataSize()); |
| 201 memoryDump->addSuballocation(dump->guid(), "malloc"); |
| 202 } |
| 203 |
| 193 } // namespace blink | 204 } // namespace blink |
| OLD | NEW |