Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/WebKit/public/web/WebInputElement.h

Issue 1365203002: Make WebNode::to<Type>() (and toConst) casts contain type asserts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add BLINK_IMPLEMENTATION guard. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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
32 #define WebInputElement_h 32 #define WebInputElement_h
33 33
34 #include "WebFormControlElement.h" 34 #include "WebFormControlElement.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class HTMLInputElement; 38 class HTMLInputElement;
39 class WebElementCollection; 39 class WebElementCollection;
40 40
41 // Provides readonly access to some properties of a DOM input element node. 41 // Provides readonly access to some properties of a DOM input element node.
42 class WebInputElement : public WebFormControlElement { 42 class WebInputElement final : public WebFormControlElement {
43 public: 43 public:
44 WebInputElement() : WebFormControlElement() { } 44 WebInputElement() : WebFormControlElement() { }
45 WebInputElement(const WebInputElement& element) : WebFormControlElement(elem ent) { } 45 WebInputElement(const WebInputElement& element) : WebFormControlElement(elem ent) { }
46 46
47 WebInputElement& operator=(const WebInputElement& element) 47 WebInputElement& operator=(const WebInputElement& element)
48 { 48 {
49 WebFormControlElement::assign(element); 49 WebFormControlElement::assign(element);
50 return *this; 50 return *this;
51 } 51 }
52 void assign(const WebInputElement& element) { WebFormControlElement::assign( element); } 52 void assign(const WebInputElement& element) { WebFormControlElement::assign( element); }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // If true, forces the text of the element to be visible. 84 // If true, forces the text of the element to be visible.
85 BLINK_EXPORT void setShouldRevealPassword(bool value); 85 BLINK_EXPORT void setShouldRevealPassword(bool value);
86 86
87 #if BLINK_IMPLEMENTATION 87 #if BLINK_IMPLEMENTATION
88 WebInputElement(const PassRefPtrWillBeRawPtr<HTMLInputElement>&); 88 WebInputElement(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
89 WebInputElement& operator=(const PassRefPtrWillBeRawPtr<HTMLInputElement>&); 89 WebInputElement& operator=(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
90 operator PassRefPtrWillBeRawPtr<HTMLInputElement>() const; 90 operator PassRefPtrWillBeRawPtr<HTMLInputElement>() const;
91 #endif 91 #endif
92 }; 92 };
93 93
94 DECLARE_WEB_NODE_TYPE_CASTS(WebInputElement);
95
94 // This returns 0 if the specified WebElement is not a WebInputElement. 96 // This returns 0 if the specified WebElement is not a WebInputElement.
95 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); 97 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*);
96 // This returns 0 if the specified WebElement is not a WebInputElement. 98 // This returns 0 if the specified WebElement is not a WebInputElement.
97 inline const WebInputElement* toWebInputElement(const WebElement* element) 99 inline const WebInputElement* toWebInputElement(const WebElement* element)
98 { 100 {
99 return toWebInputElement(const_cast<WebElement*>(element)); 101 return toWebInputElement(const_cast<WebElement*>(element));
100 } 102 }
101 103
102 } // namespace blink 104 } // namespace blink
103 105
104 #endif 106 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFormElement.h ('k') | third_party/WebKit/public/web/WebLabelElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698