| 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 24 matching lines...) Expand all Loading... |
| 35 #include "platform/weborigin/KURL.h" | 35 #include "platform/weborigin/KURL.h" |
| 36 #include "platform/weborigin/Referrer.h" | 36 #include "platform/weborigin/Referrer.h" |
| 37 #include "wtf/Allocator.h" | 37 #include "wtf/Allocator.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class EncodedFormData; | 41 class EncodedFormData; |
| 42 class Event; | 42 class Event; |
| 43 struct FrameLoadRequest; | 43 struct FrameLoadRequest; |
| 44 class HTMLFormElement; | 44 class HTMLFormElement; |
| 45 class ResourceRequest; |
| 45 | 46 |
| 46 class FormSubmission : public GarbageCollectedFinalized<FormSubmission> { | 47 class FormSubmission : public GarbageCollectedFinalized<FormSubmission> { |
| 47 public: | 48 public: |
| 48 enum SubmitMethod { GetMethod, PostMethod, DialogMethod }; | 49 enum SubmitMethod { GetMethod, PostMethod, DialogMethod }; |
| 49 | 50 |
| 50 class Attributes { | 51 class Attributes { |
| 51 DISALLOW_NEW(); | 52 DISALLOW_NEW(); |
| 52 WTF_MAKE_NONCOPYABLE(Attributes); | 53 WTF_MAKE_NONCOPYABLE(Attributes); |
| 53 public: | 54 public: |
| 54 Attributes() | 55 Attributes() |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 String m_action; | 87 String m_action; |
| 87 AtomicString m_target; | 88 AtomicString m_target; |
| 88 AtomicString m_encodingType; | 89 AtomicString m_encodingType; |
| 89 String m_acceptCharset; | 90 String m_acceptCharset; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 static FormSubmission* create(HTMLFormElement*, const Attributes&, Event*); | 93 static FormSubmission* create(HTMLFormElement*, const Attributes&, Event*); |
| 93 DECLARE_TRACE(); | 94 DECLARE_TRACE(); |
| 94 | 95 |
| 95 void populateFrameLoadRequest(FrameLoadRequest&); | 96 void populateFrameLoadRequest(FrameLoadRequest&); |
| 97 void populateResourceRequest(ResourceRequest&); |
| 96 | 98 |
| 97 KURL requestURL() const; | 99 KURL requestURL() const; |
| 98 | 100 |
| 99 SubmitMethod method() const { return m_method; } | 101 SubmitMethod method() const { return m_method; } |
| 100 const KURL& action() const { return m_action; } | 102 const KURL& action() const { return m_action; } |
| 101 const AtomicString& target() const { return m_target; } | 103 const AtomicString& target() const { return m_target; } |
| 102 void clearTarget() { m_target = nullAtom; } | 104 void clearTarget() { m_target = nullAtom; } |
| 103 HTMLFormElement* form() const { return m_form.get(); } | 105 HTMLFormElement* form() const { return m_form.get(); } |
| 104 EncodedFormData* data() const { return m_formData.get(); } | 106 EncodedFormData* data() const { return m_formData.get(); } |
| 105 Event* event() const { return m_event.get(); } | 107 Event* event() const { return m_event.get(); } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 119 Member<HTMLFormElement> m_form; | 121 Member<HTMLFormElement> m_form; |
| 120 RefPtr<EncodedFormData> m_formData; | 122 RefPtr<EncodedFormData> m_formData; |
| 121 String m_boundary; | 123 String m_boundary; |
| 122 Member<Event> m_event; | 124 Member<Event> m_event; |
| 123 String m_result; | 125 String m_result; |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace blink | 128 } // namespace blink |
| 127 | 129 |
| 128 #endif // FormSubmission_h | 130 #endif // FormSubmission_h |
| OLD | NEW |