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 26 matching lines...) Expand all Loading... |
37 #if INSIDE_BLINK | 37 #if INSIDE_BLINK |
38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
39 #else | 39 #else |
40 #include <string> | 40 #include <string> |
41 #endif | 41 #endif |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class RawData; | 45 class RawData; |
46 | 46 |
47 // A container for raw bytes. It is inexpensive to copy a WebThreadSafeData obje
ct. | 47 // A container for raw bytes. It is inexpensive to copy a WebThreadSafeData |
48 // It is safe to pass a WebThreadSafeData across threads!!! | 48 // object. It is safe to pass a WebThreadSafeData across threads. |
49 class WebThreadSafeData { | 49 class WebThreadSafeData { |
50 public: | 50 public: |
51 WebThreadSafeData() {} | 51 WebThreadSafeData() {} |
52 BLINK_PLATFORM_EXPORT WebThreadSafeData(const char* data, size_t length); | 52 BLINK_PLATFORM_EXPORT WebThreadSafeData(const char* data, size_t length); |
53 | 53 |
54 ~WebThreadSafeData() { reset(); } | 54 ~WebThreadSafeData() { reset(); } |
55 | 55 |
56 BLINK_PLATFORM_EXPORT void assign(const WebThreadSafeData&); | 56 BLINK_PLATFORM_EXPORT void assign(const WebThreadSafeData&); |
57 BLINK_PLATFORM_EXPORT void reset(); | 57 BLINK_PLATFORM_EXPORT void reset(); |
58 | 58 |
(...skipping 15 matching lines...) Expand all Loading... |
74 } | 74 } |
75 #endif | 75 #endif |
76 | 76 |
77 private: | 77 private: |
78 WebPrivatePtr<RawData> m_private; | 78 WebPrivatePtr<RawData> m_private; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
82 | 82 |
83 #endif | 83 #endif |
OLD | NEW |