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 22 matching lines...) Expand all Loading... |
33 #include "core/html/HTMLInputElement.h" | 33 #include "core/html/HTMLInputElement.h" |
34 #include "core/page/ChromeClient.h" | 34 #include "core/page/ChromeClient.h" |
35 #include "platform/UserGestureIndicator.h" | 35 #include "platform/UserGestureIndicator.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 ChooserOnlyTemporalInputTypeView::ChooserOnlyTemporalInputTypeView( | 39 ChooserOnlyTemporalInputTypeView::ChooserOnlyTemporalInputTypeView( |
40 HTMLInputElement& element, | 40 HTMLInputElement& element, |
41 BaseTemporalInputType& inputType) | 41 BaseTemporalInputType& inputType) |
42 : KeyboardClickableInputTypeView(element), m_inputType(inputType) { | 42 : KeyboardClickableInputTypeView(element), m_inputType(inputType) { |
43 ThreadState::current()->registerPreFinalizer(this); | |
44 } | 43 } |
45 | 44 |
46 ChooserOnlyTemporalInputTypeView* ChooserOnlyTemporalInputTypeView::create( | 45 ChooserOnlyTemporalInputTypeView* ChooserOnlyTemporalInputTypeView::create( |
47 HTMLInputElement& element, | 46 HTMLInputElement& element, |
48 BaseTemporalInputType& inputType) { | 47 BaseTemporalInputType& inputType) { |
49 return new ChooserOnlyTemporalInputTypeView(element, inputType); | 48 return new ChooserOnlyTemporalInputTypeView(element, inputType); |
50 } | 49 } |
51 | 50 |
52 ChooserOnlyTemporalInputTypeView::~ChooserOnlyTemporalInputTypeView() { | 51 ChooserOnlyTemporalInputTypeView::~ChooserOnlyTemporalInputTypeView() { |
53 DCHECK(!m_dateTimeChooser); | 52 DCHECK(!m_dateTimeChooser); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void ChooserOnlyTemporalInputTypeView::didEndChooser() { | 133 void ChooserOnlyTemporalInputTypeView::didEndChooser() { |
135 m_dateTimeChooser.clear(); | 134 m_dateTimeChooser.clear(); |
136 } | 135 } |
137 | 136 |
138 void ChooserOnlyTemporalInputTypeView::closeDateTimeChooser() { | 137 void ChooserOnlyTemporalInputTypeView::closeDateTimeChooser() { |
139 if (m_dateTimeChooser) | 138 if (m_dateTimeChooser) |
140 m_dateTimeChooser->endChooser(); | 139 m_dateTimeChooser->endChooser(); |
141 } | 140 } |
142 | 141 |
143 } // namespace blink | 142 } // namespace blink |
OLD | NEW |