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 20 matching lines...) Expand all Loading... |
31 #ifndef ColorInputType_h | 31 #ifndef ColorInputType_h |
32 #define ColorInputType_h | 32 #define ColorInputType_h |
33 | 33 |
34 #include "core/html/forms/BaseClickableWithKeyInputType.h" | 34 #include "core/html/forms/BaseClickableWithKeyInputType.h" |
35 #include "core/html/forms/ColorChooserClient.h" | 35 #include "core/html/forms/ColorChooserClient.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class ColorChooser; | 39 class ColorChooser; |
40 | 40 |
41 class ColorInputType FINAL : public BaseClickableWithKeyInputType, public ColorC
hooserClient { | 41 class ColorInputType final : public BaseClickableWithKeyInputType, public ColorC
hooserClient { |
42 public: | 42 public: |
43 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); | 43 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); |
44 virtual ~ColorInputType(); | 44 virtual ~ColorInputType(); |
45 | 45 |
46 // ColorChooserClient implementation. | 46 // ColorChooserClient implementation. |
47 virtual void didChooseColor(const Color&) OVERRIDE; | 47 virtual void didChooseColor(const Color&) override; |
48 virtual void didEndChooser() OVERRIDE; | 48 virtual void didEndChooser() override; |
49 virtual Element& ownerElement() const OVERRIDE; | 49 virtual Element& ownerElement() const override; |
50 virtual IntRect elementRectRelativeToRootView() const OVERRIDE; | 50 virtual IntRect elementRectRelativeToRootView() const override; |
51 virtual Color currentColor() OVERRIDE; | 51 virtual Color currentColor() override; |
52 virtual bool shouldShowSuggestions() const OVERRIDE; | 52 virtual bool shouldShowSuggestions() const override; |
53 virtual Vector<ColorSuggestion> suggestions() const OVERRIDE; | 53 virtual Vector<ColorSuggestion> suggestions() const override; |
54 ColorChooserClient* colorChooserClient() OVERRIDE; | 54 ColorChooserClient* colorChooserClient() override; |
55 | 55 |
56 private: | 56 private: |
57 ColorInputType(HTMLInputElement& element) : BaseClickableWithKeyInputType(el
ement) { } | 57 ColorInputType(HTMLInputElement& element) : BaseClickableWithKeyInputType(el
ement) { } |
58 virtual void countUsage() OVERRIDE; | 58 virtual void countUsage() override; |
59 virtual const AtomicString& formControlType() const OVERRIDE; | 59 virtual const AtomicString& formControlType() const override; |
60 virtual bool supportsRequired() const OVERRIDE; | 60 virtual bool supportsRequired() const override; |
61 virtual String fallbackValue() const OVERRIDE; | 61 virtual String fallbackValue() const override; |
62 virtual String sanitizeValue(const String&) const OVERRIDE; | 62 virtual String sanitizeValue(const String&) const override; |
63 virtual void createShadowSubtree() OVERRIDE; | 63 virtual void createShadowSubtree() override; |
64 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) OVERRIDE; | 64 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) override; |
65 virtual void handleDOMActivateEvent(Event*) OVERRIDE; | 65 virtual void handleDOMActivateEvent(Event*) override; |
66 virtual void closePopupView() OVERRIDE; | 66 virtual void closePopupView() override; |
67 virtual bool shouldRespectListAttribute() OVERRIDE; | 67 virtual bool shouldRespectListAttribute() override; |
68 virtual bool typeMismatchFor(const String&) const OVERRIDE; | 68 virtual bool typeMismatchFor(const String&) const override; |
69 virtual void updateView() OVERRIDE; | 69 virtual void updateView() override; |
70 virtual AXObject* popupRootAXObject() OVERRIDE; | 70 virtual AXObject* popupRootAXObject() override; |
71 | 71 |
72 Color valueAsColor() const; | 72 Color valueAsColor() const; |
73 void endColorChooser(); | 73 void endColorChooser(); |
74 HTMLElement* shadowColorSwatch() const; | 74 HTMLElement* shadowColorSwatch() const; |
75 | 75 |
76 OwnPtr<ColorChooser> m_chooser; | 76 OwnPtr<ColorChooser> m_chooser; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
80 | 80 |
81 #endif // ColorInputType_h | 81 #endif // ColorInputType_h |
OLD | NEW |