| // Copyright 2019 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module content.mojom; |
| |
| import "ui/base/ime/mojo/ime_types.mojom"; |
| |
| struct DateTimeSuggestion { |
| // The date/time value represented as a double. |
| double value; |
| |
| // The localized value to be shown to the user. |
| string localized_value; |
| |
| // The label for the suggestion. |
| string label; |
| }; |
| |
| struct DateTimeDialogValue { |
| ui.mojom.TextInputType dialog_type; |
| double dialog_value; |
| double minimum; |
| double maximum; |
| double step; |
| array<DateTimeSuggestion> suggestions; |
| }; |
| |
| // Interface exposed by the browser to the renderer. |
| interface DateTimePicker { |
| // Requires for opening a date/time dialog, and then |dialog_value| is |
| // returned to replace a date/time input field. |
| [EnableIf=is_android] |
| OpenDateTimeDialog(DateTimeDialogValue value) => |
| (bool success, double dialog_value); |
| }; |