| 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_PRE_FINALIZER(BaseChooserOnlyDateAndTimeInputType, closeDateTi
meChooser); |
| 38 protected: | 40 protected: |
| 39 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement& element) : BaseDateAnd
TimeInputType(element) { } | 41 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement&); |
| 40 ~BaseChooserOnlyDateAndTimeInputType() override; | 42 ~BaseChooserOnlyDateAndTimeInputType() override; |
| 41 | 43 |
| 44 DECLARE_VIRTUAL_TRACE(); |
| 45 |
| 42 private: | 46 private: |
| 43 void closeDateTimeChooser(); | 47 void closeDateTimeChooser(); |
| 44 | 48 |
| 45 // InputType functions: | 49 // InputType functions: |
| 46 void createShadowSubtree() override; | 50 void createShadowSubtree() override; |
| 47 void closePopupView() override; | 51 void closePopupView() override; |
| 48 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over
ride; | 52 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over
ride; |
| 49 void handleDOMActivateEvent(Event*) override; | 53 void handleDOMActivateEvent(Event*) override; |
| 50 void handleKeydownEvent(KeyboardEvent*) override; | 54 void handleKeydownEvent(KeyboardEvent*) override; |
| 51 void handleKeypressEvent(KeyboardEvent*) override; | 55 void handleKeypressEvent(KeyboardEvent*) override; |
| 52 void handleKeyupEvent(KeyboardEvent*) override; | 56 void handleKeyupEvent(KeyboardEvent*) override; |
| 53 void accessKeyAction(bool sendMouseEvents) override; | 57 void accessKeyAction(bool sendMouseEvents) override; |
| 54 void updateView() override; | 58 void updateView() override; |
| 55 | 59 |
| 56 // DateTimeChooserClient functions: | 60 // DateTimeChooserClient functions: |
| 57 Element& ownerElement() const override; | 61 Element& ownerElement() const override; |
| 58 void didChooseValue(const String&) override; | 62 void didChooseValue(const String&) override; |
| 59 void didChooseValue(double) override; | 63 void didChooseValue(double) override; |
| 60 void didEndChooser() override; | 64 void didEndChooser() override; |
| 61 | 65 |
| 62 RefPtr<DateTimeChooser> m_dateTimeChooser; | 66 RefPtrWillBeMember<DateTimeChooser> m_dateTimeChooser; |
| 63 }; | 67 }; |
| 64 | 68 |
| 65 } | 69 } |
| 66 #endif | 70 #endif |
| 67 #endif | 71 #endif |
| OLD | NEW |