Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / encoding / TextEncoder.h
index 287ebd3..a023c75 100644 (file)
 #ifndef TextEncoder_h
 #define TextEncoder_h
 
-#include "heap/Handle.h"
-#include "wtf/ArrayBufferView.h"
-#include "wtf/RefCounted.h"
-#include "wtf/Uint8Array.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/DOMTypedArray.h"
+#include "platform/heap/Handle.h"
 #include "wtf/text/TextCodec.h"
 #include "wtf/text/TextEncoding.h"
 #include "wtf/text/WTFString.h"
 
-namespace WebCore {
+namespace blink {
 
-class Dictionary;
 class ExceptionState;
 
-class TextEncoder FINAL : public RefCountedWillBeGarbageCollectedFinalized<TextEncoder> {
+class TextEncoder final : public GarbageCollectedFinalized<TextEncoder>, public ScriptWrappable {
+    DEFINE_WRAPPERTYPEINFO();
 public:
-    static PassRefPtrWillBeRawPtr<TextEncoder> create(const String& utfLabel, ExceptionState&);
+    static TextEncoder* create(const String& utfLabel, ExceptionState&);
     ~TextEncoder();
 
     // Implement the IDL
     String encoding() const;
-    PassRefPtr<Uint8Array> encode(const String&, const Dictionary&);
+    PassRefPtr<DOMUint8Array> encode(const String&);
 
     void trace(Visitor*) { }
 
 private:
-    TextEncoder(const String& encoding);
+    TextEncoder(const WTF::TextEncoding&);
 
     WTF::TextEncoding m_encoding;
     OwnPtr<WTF::TextCodec> m_codec;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // TextEncoder_h