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 29 matching lines...) Expand all Loading... |
40 namespace WTF{ | 40 namespace WTF{ |
41 class TextEncoding; | 41 class TextEncoding; |
42 } | 42 } |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class Blob; | 46 class Blob; |
47 class HTMLFormElement; | 47 class HTMLFormElement; |
48 | 48 |
49 class DOMFormData : public RefCountedWillBeGarbageCollectedFinalized<DOMFormData
>, public FormDataList, public ScriptWrappable { | 49 class DOMFormData : public RefCountedWillBeGarbageCollectedFinalized<DOMFormData
>, public FormDataList, public ScriptWrappable { |
| 50 DEFINE_WRAPPERTYPEINFO(); |
50 public: | 51 public: |
51 static PassRefPtrWillBeRawPtr<DOMFormData> create(HTMLFormElement* form = 0) | 52 static PassRefPtrWillBeRawPtr<DOMFormData> create(HTMLFormElement* form = 0) |
52 { | 53 { |
53 return adoptRefWillBeNoop(new DOMFormData(form)); | 54 return adoptRefWillBeNoop(new DOMFormData(form)); |
54 } | 55 } |
55 | 56 |
56 static PassRefPtrWillBeRawPtr<DOMFormData> create(const WTF::TextEncoding& e
ncoding) | 57 static PassRefPtrWillBeRawPtr<DOMFormData> create(const WTF::TextEncoding& e
ncoding) |
57 { | 58 { |
58 return adoptRefWillBeNoop(new DOMFormData(encoding)); | 59 return adoptRefWillBeNoop(new DOMFormData(encoding)); |
59 } | 60 } |
60 | 61 |
61 void append(const String& name, const String& value); | 62 void append(const String& name, const String& value); |
62 void append(const String& name, Blob*, const String& filename = String()); | 63 void append(const String& name, Blob*, const String& filename = String()); |
63 | 64 |
64 private: | 65 private: |
65 explicit DOMFormData(const WTF::TextEncoding&); | 66 explicit DOMFormData(const WTF::TextEncoding&); |
66 explicit DOMFormData(HTMLFormElement*); | 67 explicit DOMFormData(HTMLFormElement*); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace blink | 70 } // namespace blink |
70 | 71 |
71 #endif // DOMFormData_h | 72 #endif // DOMFormData_h |
OLD | NEW |