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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 visitor->Trace(client_); | 72 visitor->Trace(client_); |
73 DateTimeChooser::Trace(visitor); | 73 DateTimeChooser::Trace(visitor); |
74 } | 74 } |
75 | 75 |
76 void DateTimeChooserImpl::EndChooser() { | 76 void DateTimeChooserImpl::EndChooser() { |
77 if (!popup_) | 77 if (!popup_) |
78 return; | 78 return; |
79 chrome_client_->ClosePagePopup(popup_); | 79 chrome_client_->ClosePagePopup(popup_); |
80 } | 80 } |
81 | 81 |
82 AXObject* DateTimeChooserImpl::RootAXObject() { | 82 AXObjectImpl* DateTimeChooserImpl::RootAXObject() { |
83 return popup_ ? popup_->RootAXObject() : 0; | 83 return popup_ ? popup_->RootAXObject() : 0; |
84 } | 84 } |
85 | 85 |
86 static String ValueToDateTimeString(double value, AtomicString type) { | 86 static String ValueToDateTimeString(double value, AtomicString type) { |
87 DateComponents components; | 87 DateComponents components; |
88 if (type == InputTypeNames::date) | 88 if (type == InputTypeNames::date) |
89 components.SetMillisecondsSinceEpochForDate(value); | 89 components.SetMillisecondsSinceEpochForDate(value); |
90 else if (type == InputTypeNames::datetime_local) | 90 else if (type == InputTypeNames::datetime_local) |
91 components.SetMillisecondsSinceEpochForDateTimeLocal(value); | 91 components.SetMillisecondsSinceEpochForDateTimeLocal(value); |
92 else if (type == InputTypeNames::month) | 92 else if (type == InputTypeNames::month) |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 EndChooser(); | 237 EndChooser(); |
238 } | 238 } |
239 | 239 |
240 void DateTimeChooserImpl::DidClosePopup() { | 240 void DateTimeChooserImpl::DidClosePopup() { |
241 DCHECK(client_); | 241 DCHECK(client_); |
242 popup_ = nullptr; | 242 popup_ = nullptr; |
243 client_->DidEndChooser(); | 243 client_->DidEndChooser(); |
244 } | 244 } |
245 | 245 |
246 } // namespace blink | 246 } // namespace blink |
OLD | NEW |