| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 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 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef SharedBuffer_h | 27 #ifndef SharedBuffer_h |
| 28 #define SharedBuffer_h | 28 #define SharedBuffer_h |
| 29 | 29 |
| 30 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
| 31 #include "platform/PurgeableVector.h" | 31 #include "platform/PurgeableVector.h" |
| 32 #include "third_party/skia/include/core/SkData.h" | 32 #include "third_party/skia/include/core/SkData.h" |
| 33 #include "wtf/Forward.h" | 33 #include "wtf/Forward.h" |
| 34 #include "wtf/OwnPtr.h" | |
| 35 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 36 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 37 | 36 |
| 38 namespace blink { | 37 namespace blink { |
| 39 | 38 |
| 40 class WebProcessMemoryDump; | 39 class WebProcessMemoryDump; |
| 41 | 40 |
| 42 class PLATFORM_EXPORT SharedBuffer : public RefCounted<SharedBuffer> { | 41 class PLATFORM_EXPORT SharedBuffer : public RefCounted<SharedBuffer> { |
| 43 public: | 42 public: |
| 44 enum : unsigned { kSegmentSize = 0x1000 }; | 43 enum : unsigned { kSegmentSize = 0x1000 }; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 size_t getSomeDataInternal(const char*& data, size_t position) const; | 159 size_t getSomeDataInternal(const char*& data, size_t position) const; |
| 161 | 160 |
| 162 size_t m_size; | 161 size_t m_size; |
| 163 mutable PurgeableVector m_buffer; | 162 mutable PurgeableVector m_buffer; |
| 164 mutable Vector<char*> m_segments; | 163 mutable Vector<char*> m_segments; |
| 165 }; | 164 }; |
| 166 | 165 |
| 167 } // namespace blink | 166 } // namespace blink |
| 168 | 167 |
| 169 #endif // SharedBuffer_h | 168 #endif // SharedBuffer_h |
| OLD | NEW |