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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h

Issue 1466113002: Oilpan: move BaseChooserOnlyDateAndTimeInputType to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: conditionally define GC mixin leftmost bases Created 5 years, 1 month 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) 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
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"
35
36 // Not very nice, but the derived {Date,Month,DateTimeLocal,...}InputType will
37 // have to conditionally be a GC mixin - conditional on !ENABLE(INPUT_MULTIPLE_F IELDS_UI).
38 //
39 // Provide a pair of ENABLE(INPUT_MULTIPLE_FIELDS_UI)-dependent macros that expa nd into
40 // the GC mixin and trace declarations required.
41 #define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T) WILL_BE_USING_GARBAGE_C OLLECTED_MIXIN(T)
42 #define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T) DEFINE_INLINE_VIRTUAL_T RACE() { T::trace(visitor); }
34 43
35 namespace blink { 44 namespace blink {
36 45
37 class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, pub lic DateTimeChooserClient { 46 class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, pub lic DateTimeChooserClient {
47 WILL_BE_USING_PRE_FINALIZER(BaseChooserOnlyDateAndTimeInputType, closeDateTi meChooser);
38 protected: 48 protected:
39 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement& element) : BaseDateAnd TimeInputType(element) { } 49 BaseChooserOnlyDateAndTimeInputType(HTMLInputElement&);
40 ~BaseChooserOnlyDateAndTimeInputType() override; 50 ~BaseChooserOnlyDateAndTimeInputType() override;
41 51
52 DECLARE_VIRTUAL_TRACE();
53
42 private: 54 private:
43 void closeDateTimeChooser(); 55 void closeDateTimeChooser();
44 56
45 // InputType functions: 57 // InputType functions:
46 void createShadowSubtree() override; 58 void createShadowSubtree() override;
47 void closePopupView() override; 59 void closePopupView() override;
48 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over ride; 60 void setValue(const String&, bool valueChanged, TextFieldEventBehavior) over ride;
49 void handleDOMActivateEvent(Event*) override; 61 void handleDOMActivateEvent(Event*) override;
50 void handleKeydownEvent(KeyboardEvent*) override; 62 void handleKeydownEvent(KeyboardEvent*) override;
51 void handleKeypressEvent(KeyboardEvent*) override; 63 void handleKeypressEvent(KeyboardEvent*) override;
52 void handleKeyupEvent(KeyboardEvent*) override; 64 void handleKeyupEvent(KeyboardEvent*) override;
53 void accessKeyAction(bool sendMouseEvents) override; 65 void accessKeyAction(bool sendMouseEvents) override;
54 void updateView() override; 66 void updateView() override;
55 67
56 // DateTimeChooserClient functions: 68 // DateTimeChooserClient functions:
57 Element& ownerElement() const override; 69 Element& ownerElement() const override;
58 void didChooseValue(const String&) override; 70 void didChooseValue(const String&) override;
59 void didChooseValue(double) override; 71 void didChooseValue(double) override;
60 void didEndChooser() override; 72 void didEndChooser() override;
61 73
62 RefPtr<DateTimeChooser> m_dateTimeChooser; 74 RefPtrWillBeMember<DateTimeChooser> m_dateTimeChooser;
63 }; 75 };
64 76
65 } 77 } // namespace blink
66 #endif 78
67 #endif 79 #else
80 #define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T)
81 #define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T)
82
83 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
84
85 #endif // BaseChooserOnlyDateAndTimeInputType_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698