move msg to embedder_traits, use in script, handle send error in embedder

This commit is contained in:
Gregory Terzian 2018-04-28 22:48:14 +08:00
parent a297e8f288
commit d438240772
31 changed files with 362 additions and 337 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use blob_url_store::{BlobBuf, BlobURLStoreError};
use embedder_traits::FilterPattern;
use ipc_channel::ipc::IpcSender;
use num_traits::ToPrimitive;
use std::cmp::{max, min};
@ -110,11 +111,6 @@ pub struct SelectedFile {
pub type_string: String,
}
/// Filter for file selection;
/// the `String` content is expected to be extension (e.g, "doc", without the prefixing ".")
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FilterPattern(pub String);
#[derive(Deserialize, Serialize)]
pub enum FileManagerThreadMsg {
/// Select a single file. Last field is pre-selected file path for testing