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

Side by Side Diff: Source/WebKit/chromium/public/WebInputElement.h

Issue 10037002: Datalist UI (WebKit part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk
Patch Set: fixed Created 8 years, 8 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 #if WEBKIT_IMPLEMENTATION 36 #if WEBKIT_IMPLEMENTATION
37 namespace WebCore { class HTMLInputElement; } 37 namespace WebCore { class HTMLInputElement; }
38 #endif 38 #endif
39 39
40 namespace WebKit { 40 namespace WebKit {
41 41
42 class WebDataListElement;
43
42 // Provides readonly access to some properties of a DOM input element node. 44 // Provides readonly access to some properties of a DOM input element node.
43 class WebInputElement : public WebFormControlElement { 45 class WebInputElement : public WebFormControlElement {
44 public: 46 public:
45 enum SpeechInputState { 47 enum SpeechInputState {
46 Idle, 48 Idle,
47 Recording, 49 Recording,
48 Recognizing, 50 Recognizing,
49 }; 51 };
50 52
51 WebInputElement() : WebFormControlElement() { } 53 WebInputElement() : WebFormControlElement() { }
(...skipping 25 matching lines...) Expand all
77 WEBKIT_EXPORT void setPlaceholder(const WebString&); 79 WEBKIT_EXPORT void setPlaceholder(const WebString&);
78 WEBKIT_EXPORT WebString placeholder() const; 80 WEBKIT_EXPORT WebString placeholder() const;
79 WEBKIT_EXPORT bool isAutofilled() const; 81 WEBKIT_EXPORT bool isAutofilled() const;
80 WEBKIT_EXPORT void setAutofilled(bool); 82 WEBKIT_EXPORT void setAutofilled(bool);
81 WEBKIT_EXPORT void setSelectionRange(int, int); 83 WEBKIT_EXPORT void setSelectionRange(int, int);
82 WEBKIT_EXPORT int selectionStart() const; 84 WEBKIT_EXPORT int selectionStart() const;
83 WEBKIT_EXPORT int selectionEnd() const; 85 WEBKIT_EXPORT int selectionEnd() const;
84 WEBKIT_EXPORT bool isValidValue(const WebString&) const; 86 WEBKIT_EXPORT bool isValidValue(const WebString&) const;
85 WEBKIT_EXPORT bool isChecked() const; 87 WEBKIT_EXPORT bool isChecked() const;
86 88
89 WEBKIT_EXPORT WebDataListElement dataList() const;
90
87 WEBKIT_EXPORT bool isSpeechInputEnabled() const; 91 WEBKIT_EXPORT bool isSpeechInputEnabled() const;
88 WEBKIT_EXPORT SpeechInputState getSpeechInputState() const; 92 WEBKIT_EXPORT SpeechInputState getSpeechInputState() const;
89 WEBKIT_EXPORT void startSpeechInput(); 93 WEBKIT_EXPORT void startSpeechInput();
90 WEBKIT_EXPORT void stopSpeechInput(); 94 WEBKIT_EXPORT void stopSpeechInput();
91 95
92 // Exposes the default value of the maxLength attribute. 96 // Exposes the default value of the maxLength attribute.
93 WEBKIT_EXPORT static int defaultMaxLength(); 97 WEBKIT_EXPORT static int defaultMaxLength();
94 98
95 #if WEBKIT_IMPLEMENTATION 99 #if WEBKIT_IMPLEMENTATION
96 WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); 100 WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
97 WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputEleme nt>&); 101 WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputEleme nt>&);
98 operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const; 102 operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const;
99 #endif 103 #endif
100 }; 104 };
101 105
102 WEBKIT_EXPORT WebInputElement* toWebInputElement(WebElement*); 106 WEBKIT_EXPORT WebInputElement* toWebInputElement(WebElement*);
103 107
104 inline const WebInputElement* toWebInputElement(const WebElement* element) 108 inline const WebInputElement* toWebInputElement(const WebElement* element)
105 { 109 {
106 return toWebInputElement(const_cast<WebElement*>(element)); 110 return toWebInputElement(const_cast<WebElement*>(element));
107 } 111 }
108 112
109 } // namespace WebKit 113 } // namespace WebKit
110 114
111 #endif 115 #endif
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/public/WebDataListElement.h ('k') | Source/WebKit/chromium/public/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698