OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ExceptionState; | 43 class ExceptionState; |
44 | 44 |
45 class TextEncoder final : public GarbageCollectedFinalized<TextEncoder>, public
ScriptWrappable { | 45 class TextEncoder final : public GarbageCollectedFinalized<TextEncoder>, public
ScriptWrappable { |
46 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
47 public: | 47 public: |
48 static TextEncoder* create(const String& utfLabel, ExceptionState&); | 48 static TextEncoder* create(const String& utfLabel, ExceptionState&); |
49 ~TextEncoder(); | 49 ~TextEncoder(); |
50 | 50 |
51 // Implement the IDL | 51 // Implement the IDL |
52 String encoding() const; | 52 String encoding() const; |
53 PassRefPtr<DOMUint8Array> encode(const String&); | 53 PassRefPtr<DOMUint8Array> encode(const String&, ExceptionState&); |
54 | 54 |
55 DEFINE_INLINE_TRACE() { } | 55 DEFINE_INLINE_TRACE() { } |
56 | 56 |
57 private: | 57 private: |
58 TextEncoder(const WTF::TextEncoding&); | 58 TextEncoder(const WTF::TextEncoding&); |
59 | 59 |
60 WTF::TextEncoding m_encoding; | 60 WTF::TextEncoding m_encoding; |
61 OwnPtr<WTF::TextCodec> m_codec; | 61 OwnPtr<WTF::TextCodec> m_codec; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
65 | 65 |
66 #endif // TextEncoder_h | 66 #endif // TextEncoder_h |
OLD | NEW |