| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_FORM_FIELD_H_ | 5 #ifndef WEBKIT_GLUE_FORM_FIELD_H_ |
| 6 #define WEBKIT_GLUE_FORM_FIELD_H_ | 6 #define WEBKIT_GLUE_FORM_FIELD_H_ |
| 7 | 7 |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 | 9 |
| 10 namespace WebCore { | |
| 11 class HTMLFormControlElement; | |
| 12 } | |
| 13 | |
| 14 namespace webkit_glue { | 10 namespace webkit_glue { |
| 15 | 11 |
| 16 // Stores information about a field in a form. | 12 // Stores information about a field in a form. |
| 17 class FormField { | 13 class FormField { |
| 18 public: | 14 public: |
| 19 FormField(); | 15 FormField(); |
| 20 FormField(WebCore::HTMLFormControlElement* element, | 16 FormField(const string16& name, |
| 21 const string16& name, | |
| 22 const string16& value); | 17 const string16& value); |
| 23 | 18 |
| 24 WebCore::HTMLFormControlElement* element() const { return element_; } | |
| 25 string16 name() const { return name_; } | 19 string16 name() const { return name_; } |
| 26 string16 value() const { return value_; } | 20 string16 value() const { return value_; } |
| 27 | 21 |
| 28 void set_element(WebCore::HTMLFormControlElement* element) { | |
| 29 element_ = element; | |
| 30 } | |
| 31 void set_value(const string16& value) { value_ = value; } | 22 void set_value(const string16& value) { value_ = value; } |
| 32 | 23 |
| 33 private: | 24 private: |
| 34 WebCore::HTMLFormControlElement* element_; | |
| 35 string16 name_; | 25 string16 name_; |
| 36 string16 value_; | 26 string16 value_; |
| 37 }; | 27 }; |
| 38 | 28 |
| 39 } // namespace webkit_glue | 29 } // namespace webkit_glue |
| 40 | 30 |
| 41 #endif // WEBKIT_GLUE_FORM_FIELD_H_ | 31 #endif // WEBKIT_GLUE_FORM_FIELD_H_ |
| OLD | NEW |