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 21 matching lines...) Expand all Loading... |
32 #define WebOptionElement_h | 32 #define WebOptionElement_h |
33 | 33 |
34 #include "../platform/WebVector.h" | 34 #include "../platform/WebVector.h" |
35 #include "WebElement.h" | 35 #include "WebElement.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class HTMLOptionElement; | 39 class HTMLOptionElement; |
40 | 40 |
41 // Provides readonly access to some properties of a DOM option element node. | 41 // Provides readonly access to some properties of a DOM option element node. |
42 class WebOptionElement : public WebElement { | 42 class WebOptionElement final : public WebElement { |
43 public: | 43 public: |
44 WebOptionElement() : WebElement() { } | 44 WebOptionElement() : WebElement() { } |
45 WebOptionElement(const WebOptionElement& element) : WebElement(element) { } | 45 WebOptionElement(const WebOptionElement& element) : WebElement(element) { } |
46 | 46 |
47 WebOptionElement& operator=(const WebOptionElement& element) | 47 WebOptionElement& operator=(const WebOptionElement& element) |
48 { | 48 { |
49 WebElement::assign(element); | 49 WebElement::assign(element); |
50 return *this; | 50 return *this; |
51 } | 51 } |
52 void assign(const WebOptionElement& element) { WebElement::assign(element);
} | 52 void assign(const WebOptionElement& element) { WebElement::assign(element);
} |
53 | 53 |
54 BLINK_EXPORT void setValue(const WebString&); | 54 BLINK_EXPORT void setValue(const WebString&); |
55 BLINK_EXPORT WebString value() const; | 55 BLINK_EXPORT WebString value() const; |
56 | 56 |
57 BLINK_EXPORT int index() const; | 57 BLINK_EXPORT int index() const; |
58 BLINK_EXPORT WebString text() const; | 58 BLINK_EXPORT WebString text() const; |
59 BLINK_EXPORT WebString label() const; | 59 BLINK_EXPORT WebString label() const; |
60 BLINK_EXPORT bool isEnabled() const; | 60 BLINK_EXPORT bool isEnabled() const; |
61 | 61 |
62 #if BLINK_IMPLEMENTATION | 62 #if BLINK_IMPLEMENTATION |
63 WebOptionElement(const PassRefPtrWillBeRawPtr<HTMLOptionElement>&); | 63 WebOptionElement(const PassRefPtrWillBeRawPtr<HTMLOptionElement>&); |
64 WebOptionElement& operator=(const PassRefPtrWillBeRawPtr<HTMLOptionElement>&
); | 64 WebOptionElement& operator=(const PassRefPtrWillBeRawPtr<HTMLOptionElement>&
); |
65 operator PassRefPtrWillBeRawPtr<HTMLOptionElement>() const; | 65 operator PassRefPtrWillBeRawPtr<HTMLOptionElement>() const; |
66 #endif | 66 #endif |
67 }; | 67 }; |
68 | 68 |
| 69 DECLARE_WEB_NODE_TYPE_CASTS(WebOptionElement); |
| 70 |
69 } // namespace blink | 71 } // namespace blink |
70 | 72 |
71 #endif | 73 #endif |
OLD | NEW |