refactor(embedder): rename file select message

This commit is contained in:
OJ Kwon 2018-04-16 00:21:21 -07:00
parent 2fab94785b
commit 9ff11b9af3
No known key found for this signature in database
GPG key ID: 6C23A45602A44DA6
3 changed files with 4 additions and 4 deletions

View file

@ -145,7 +145,7 @@ pub enum EmbedderMsg {
/// Open dialog to select bluetooth device. /// Open dialog to select bluetooth device.
GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>), GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>),
/// Open file dialog to select files. Set boolean flag to true allows to select multiple files. /// Open file dialog to select files. Set boolean flag to true allows to select multiple files.
GetSelectedFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>), SelectFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>),
/// Request to present an IME to the user when an editable element is focused. /// Request to present an IME to the user when an editable element is focused.
ShowIME(TopLevelBrowsingContextId, InputMethodType), ShowIME(TopLevelBrowsingContextId, InputMethodType),
/// Request to hide the IME when the editable element is blurred. /// Request to hide the IME when the editable element is blurred.
@ -251,7 +251,7 @@ impl Debug for EmbedderMsg {
EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"), EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"),
EmbedderMsg::Panic(..) => write!(f, "Panic"), EmbedderMsg::Panic(..) => write!(f, "Panic"),
EmbedderMsg::GetSelectedBluetoothDevice(..) => write!(f, "GetSelectedBluetoothDevice"), EmbedderMsg::GetSelectedBluetoothDevice(..) => write!(f, "GetSelectedBluetoothDevice"),
EmbedderMsg::GetSelectedFiles(..) => write!(f, "GetSelectedFiles"), EmbedderMsg::SelectFiles(..) => write!(f, "SelectFiles"),
EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"), EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"),
EmbedderMsg::HideIME(..) => write!(f, "HideIME"), EmbedderMsg::HideIME(..) => write!(f, "HideIME"),
EmbedderMsg::Shutdown => write!(f, "Shutdown"), EmbedderMsg::Shutdown => write!(f, "Shutdown"),

View file

@ -220,7 +220,7 @@ impl FileManagerStore {
multiple_files: bool, multiple_files: bool,
embedder_proxy: EmbedderProxy) -> Option<Vec<String>> { embedder_proxy: EmbedderProxy) -> Option<Vec<String>> {
let (ipc_sender, ipc_receiver) = ipc::channel().expect("Failed to create IPC channel!"); let (ipc_sender, ipc_receiver) = ipc::channel().expect("Failed to create IPC channel!");
let msg = EmbedderMsg::GetSelectedFiles(patterns, multiple_files, ipc_sender); let msg = EmbedderMsg::SelectFiles(patterns, multiple_files, ipc_sender);
embedder_proxy.send(msg); embedder_proxy.send(msg);
match ipc_receiver.recv() { match ipc_receiver.recv() {

View file

@ -297,7 +297,7 @@ impl Browser {
EmbedderMsg::GetSelectedBluetoothDevice(devices, sender) => { EmbedderMsg::GetSelectedBluetoothDevice(devices, sender) => {
platform_get_selected_devices(devices, sender); platform_get_selected_devices(devices, sender);
}, },
EmbedderMsg::GetSelectedFiles(patterns, multiple_files, sender) => { EmbedderMsg::SelectFiles(patterns, multiple_files, sender) => {
if opts::get().headless { if opts::get().headless {
let _ = sender.send(None); let _ = sender.send(None);
} }