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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 BLINK_PLATFORM_EXPORT size_t size() const; | 59 BLINK_PLATFORM_EXPORT size_t size() const; |
60 BLINK_PLATFORM_EXPORT const char* Data() const; | 60 BLINK_PLATFORM_EXPORT const char* Data() const; |
61 | 61 |
62 bool IsEmpty() const { return !size(); } | 62 bool IsEmpty() const { return !size(); } |
63 | 63 |
64 BLINK_PLATFORM_EXPORT WebThreadSafeData(const WebThreadSafeData&); | 64 BLINK_PLATFORM_EXPORT WebThreadSafeData(const WebThreadSafeData&); |
65 BLINK_PLATFORM_EXPORT WebThreadSafeData& operator=(const WebThreadSafeData&); | 65 BLINK_PLATFORM_EXPORT WebThreadSafeData& operator=(const WebThreadSafeData&); |
66 | 66 |
67 #if INSIDE_BLINK | 67 #if INSIDE_BLINK |
68 BLINK_PLATFORM_EXPORT WebThreadSafeData(WTF::PassRefPtr<RawData>); | 68 BLINK_PLATFORM_EXPORT WebThreadSafeData(WTF::PassRefPtr<RawData>); |
| 69 BLINK_PLATFORM_EXPORT WebThreadSafeData(WTF::RefPtr<RawData>&&); |
69 BLINK_PLATFORM_EXPORT WebThreadSafeData& operator=(WTF::PassRefPtr<RawData>); | 70 BLINK_PLATFORM_EXPORT WebThreadSafeData& operator=(WTF::PassRefPtr<RawData>); |
70 #else | 71 #else |
71 operator std::string() const { | 72 operator std::string() const { |
72 size_t len = size(); | 73 size_t len = size(); |
73 return len ? std::string(Data(), len) : std::string(); | 74 return len ? std::string(Data(), len) : std::string(); |
74 } | 75 } |
75 #endif | 76 #endif |
76 | 77 |
77 private: | 78 private: |
78 WebPrivatePtr<RawData> private_; | 79 WebPrivatePtr<RawData> private_; |
79 }; | 80 }; |
80 | 81 |
81 } // namespace blink | 82 } // namespace blink |
82 | 83 |
83 #endif | 84 #endif |
OLD | NEW |