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 23 matching lines...) Expand all Loading... |
34 #include "core/html/forms/BaseTextInputType.h" | 34 #include "core/html/forms/BaseTextInputType.h" |
35 #include "platform/Timer.h" | 35 #include "platform/Timer.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class SearchFieldCancelButtonElement; | 39 class SearchFieldCancelButtonElement; |
40 class SearchFieldDecorationElement; | 40 class SearchFieldDecorationElement; |
41 | 41 |
42 class SearchInputType : public BaseTextInputType { | 42 class SearchInputType : public BaseTextInputType { |
43 public: | 43 public: |
44 static PassRefPtr<InputType> create(HTMLInputElement*); | 44 static PassRefPtr<InputType> create(HTMLInputElement&); |
45 | 45 |
46 void stopSearchEventTimer(); | 46 void stopSearchEventTimer(); |
47 | 47 |
48 private: | 48 private: |
49 SearchInputType(HTMLInputElement*); | 49 SearchInputType(HTMLInputElement&); |
50 virtual void countUsage() OVERRIDE; | 50 virtual void countUsage() OVERRIDE; |
51 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; | 51 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; |
52 virtual const AtomicString& formControlType() const OVERRIDE; | 52 virtual const AtomicString& formControlType() const OVERRIDE; |
53 virtual bool shouldRespectSpeechAttribute() OVERRIDE; | 53 virtual bool shouldRespectSpeechAttribute() OVERRIDE; |
54 virtual bool isSearchField() const OVERRIDE; | 54 virtual bool isSearchField() const OVERRIDE; |
55 virtual bool needsContainer() const OVERRIDE; | 55 virtual bool needsContainer() const OVERRIDE; |
56 virtual void createShadowSubtree() OVERRIDE; | 56 virtual void createShadowSubtree() OVERRIDE; |
57 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; | 57 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; |
58 virtual void didSetValueByUserEdit(ValueChangeState) OVERRIDE; | 58 virtual void didSetValueByUserEdit(ValueChangeState) OVERRIDE; |
59 virtual bool supportsInputModeAttribute() const OVERRIDE; | 59 virtual bool supportsInputModeAttribute() const OVERRIDE; |
60 virtual void updateInnerTextValue() OVERRIDE; | 60 virtual void updateInnerTextValue() OVERRIDE; |
61 | 61 |
62 void searchEventTimerFired(Timer<SearchInputType>*); | 62 void searchEventTimerFired(Timer<SearchInputType>*); |
63 bool searchEventsShouldBeDispatched() const; | 63 bool searchEventsShouldBeDispatched() const; |
64 void startSearchEventTimer(); | 64 void startSearchEventTimer(); |
65 void updateCancelButtonVisibility(); | 65 void updateCancelButtonVisibility(); |
66 | 66 |
67 Timer<SearchInputType> m_searchEventTimer; | 67 Timer<SearchInputType> m_searchEventTimer; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace WebCore | 70 } // namespace WebCore |
71 | 71 |
72 #endif // SearchInputType_h | 72 #endif // SearchInputType_h |
OLD | NEW |