OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef BaseChooserOnlyDateAndTimeInputType_h | 26 #ifndef BaseChooserOnlyDateAndTimeInputType_h |
27 #define BaseChooserOnlyDateAndTimeInputType_h | 27 #define BaseChooserOnlyDateAndTimeInputType_h |
28 | 28 |
29 #if !ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 29 #if !ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
30 #include "core/html/forms/BaseClickableWithKeyInputType.h" | 30 #include "core/html/forms/BaseClickableWithKeyInputType.h" |
31 #include "core/html/forms/BaseDateAndTimeInputType.h" | 31 #include "core/html/forms/BaseDateAndTimeInputType.h" |
32 #include "core/html/forms/DateTimeChooser.h" | 32 #include "core/html/forms/DateTimeChooser.h" |
33 #include "core/html/forms/DateTimeChooserClient.h" | 33 #include "core/html/forms/DateTimeChooserClient.h" |
| 34 #include "platform/heap/Handle.h" |
34 | 35 |
35 namespace blink { | 36 namespace blink { |
36 | 37 |
37 class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, pub
lic DateTimeChooserClient { | 38 class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, pub
lic DateTimeChooserClient { |
| 39 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(BaseChooserOnlyDateAndTimeInputType); |
| 40 WILL_BE_USING_PRE_FINALIZER(BaseChooserOnlyDateAndTimeInputType, closeDateTi
meChooser); |
38 protected: | 41 protected: |
39 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement& element) : BaseDateAnd
TimeInputType(element) { } | 42 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement&); |
40 ~BaseChooserOnlyDateAndTimeInputType() override; | 43 ~BaseChooserOnlyDateAndTimeInputType() override; |
41 | 44 |
| 45 DECLARE_VIRTUAL_TRACE(); |
| 46 |
42 private: | 47 private: |
43 void closeDateTimeChooser(); | 48 void closeDateTimeChooser(); |
44 | 49 |
45 // InputType functions: | 50 // InputType functions: |
46 void createShadowSubtree() override; | 51 void createShadowSubtree() override; |
47 void closePopupView() override; | 52 void closePopupView() override; |
48 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over
ride; | 53 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over
ride; |
49 void handleDOMActivateEvent(Event*) override; | 54 void handleDOMActivateEvent(Event*) override; |
50 void handleKeydownEvent(KeyboardEvent*) override; | 55 void handleKeydownEvent(KeyboardEvent*) override; |
51 void handleKeypressEvent(KeyboardEvent*) override; | 56 void handleKeypressEvent(KeyboardEvent*) override; |
52 void handleKeyupEvent(KeyboardEvent*) override; | 57 void handleKeyupEvent(KeyboardEvent*) override; |
53 void accessKeyAction(bool sendMouseEvents) override; | 58 void accessKeyAction(bool sendMouseEvents) override; |
54 void updateView() override; | 59 void updateView() override; |
55 | 60 |
56 // DateTimeChooserClient functions: | 61 // DateTimeChooserClient functions: |
57 Element& ownerElement() const override; | 62 Element& ownerElement() const override; |
58 void didChooseValue(const String&) override; | 63 void didChooseValue(const String&) override; |
59 void didChooseValue(double) override; | 64 void didChooseValue(double) override; |
60 void didEndChooser() override; | 65 void didEndChooser() override; |
61 | 66 |
62 RefPtr<DateTimeChooser> m_dateTimeChooser; | 67 RefPtrWillBeMember<DateTimeChooser> m_dateTimeChooser; |
63 }; | 68 }; |
64 | 69 |
65 } | 70 } // namespace blink |
66 #endif | 71 |
67 #endif | 72 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 73 #endif // BaseChooserOnlyDateAndTimeInputType_h |
OLD | NEW |