| 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 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PickerIndicatorElement::openPopup() | 105 void PickerIndicatorElement::openPopup() |
| 106 { | 106 { |
| 107 if (m_chooser) | 107 if (m_chooser) |
| 108 return; | 108 return; |
| 109 if (!document()->page()) | 109 if (!document()->page()) |
| 110 return; | 110 return; |
| 111 if (!m_pickerIndicatorOwner) | 111 if (!m_pickerIndicatorOwner) |
| 112 return; | 112 return; |
| 113 Chrome* chrome = document()->page()->chrome(); | |
| 114 if (!chrome) | |
| 115 return; | |
| 116 DateTimeChooserParameters parameters; | 113 DateTimeChooserParameters parameters; |
| 117 if (!m_pickerIndicatorOwner->setupDateTimeChooserParameters(parameters)) | 114 if (!m_pickerIndicatorOwner->setupDateTimeChooserParameters(parameters)) |
| 118 return; | 115 return; |
| 119 m_chooser = chrome->openDateTimeChooser(this, parameters); | 116 m_chooser = document()->page()->chrome().openDateTimeChooser(this, parameter
s); |
| 120 } | 117 } |
| 121 | 118 |
| 122 void PickerIndicatorElement::closePopup() | 119 void PickerIndicatorElement::closePopup() |
| 123 { | 120 { |
| 124 if (!m_chooser) | 121 if (!m_chooser) |
| 125 return; | 122 return; |
| 126 m_chooser->endChooser(); | 123 m_chooser->endChooser(); |
| 127 } | 124 } |
| 128 | 125 |
| 129 void PickerIndicatorElement::detach() | 126 void PickerIndicatorElement::detach() |
| 130 { | 127 { |
| 131 closePopup(); | 128 closePopup(); |
| 132 HTMLDivElement::detach(); | 129 HTMLDivElement::detach(); |
| 133 } | 130 } |
| 134 | 131 |
| 135 } | 132 } |
| 136 | 133 |
| 137 #endif | 134 #endif |
| OLD | NEW |