mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Move tinyfiledialog out of script into embedder.
This commit is contained in:
parent
24c14ac94e
commit
675b36dde5
6 changed files with 81 additions and 45 deletions
|
@ -185,6 +185,9 @@ pub enum EmbedderMsg {
|
|||
GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>),
|
||||
/// Open file dialog to select files. Set boolean flag to true allows to select multiple files.
|
||||
SelectFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>),
|
||||
/// Open yes/no message for user to allow permission specified by first String.
|
||||
/// With dialog title specified by second String.
|
||||
PromptPermission(String, String, IpcSender<PermissionRequest>),
|
||||
/// Request to present an IME to the user when an editable element is focused.
|
||||
ShowIME(InputMethodType),
|
||||
/// Request to hide the IME when the editable element is blurred.
|
||||
|
@ -222,6 +225,7 @@ impl Debug for EmbedderMsg {
|
|||
EmbedderMsg::Panic(..) => write!(f, "Panic"),
|
||||
EmbedderMsg::GetSelectedBluetoothDevice(..) => write!(f, "GetSelectedBluetoothDevice"),
|
||||
EmbedderMsg::SelectFiles(..) => write!(f, "SelectFiles"),
|
||||
EmbedderMsg::PromptPermission(..) => write!(f, "PromptPermission"),
|
||||
EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"),
|
||||
EmbedderMsg::HideIME => write!(f, "HideIME"),
|
||||
EmbedderMsg::Shutdown => write!(f, "Shutdown"),
|
||||
|
@ -299,3 +303,10 @@ pub enum MediaSessionEvent {
|
|||
/// Indicates that the position state is set.
|
||||
SetPositionState(MediaPositionState),
|
||||
}
|
||||
|
||||
// Status for prompting user for permission.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum PermissionRequest {
|
||||
Granted,
|
||||
Denied,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue