mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Add initial IndexedDB Support
Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Rasmus Viitanen <rasviitanen@gmail.com> Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
parent
cdff75bbd4
commit
0a79918849
36 changed files with 3108 additions and 9 deletions
|
@ -32,6 +32,7 @@ use servo_url::{ImmutableOrigin, ServoUrl};
|
|||
|
||||
use crate::filemanager_thread::FileManagerThreadMsg;
|
||||
use crate::http_status::HttpStatus;
|
||||
use crate::indexeddb_thread::IndexedDBThreadMsg;
|
||||
use crate::request::{Request, RequestBuilder};
|
||||
use crate::response::{HttpsState, Response, ResponseInit};
|
||||
use crate::storage_thread::StorageThreadMsg;
|
||||
|
@ -40,6 +41,7 @@ pub mod blob_url_store;
|
|||
pub mod filemanager_thread;
|
||||
pub mod http_status;
|
||||
pub mod image_cache;
|
||||
pub mod indexeddb_thread;
|
||||
pub mod policy_container;
|
||||
pub mod pub_domains;
|
||||
pub mod quality;
|
||||
|
@ -413,13 +415,19 @@ where
|
|||
pub struct ResourceThreads {
|
||||
pub core_thread: CoreResourceThread,
|
||||
storage_thread: IpcSender<StorageThreadMsg>,
|
||||
idb_thread: IpcSender<IndexedDBThreadMsg>,
|
||||
}
|
||||
|
||||
impl ResourceThreads {
|
||||
pub fn new(c: CoreResourceThread, s: IpcSender<StorageThreadMsg>) -> ResourceThreads {
|
||||
pub fn new(
|
||||
c: CoreResourceThread,
|
||||
s: IpcSender<StorageThreadMsg>,
|
||||
i: IpcSender<IndexedDBThreadMsg>,
|
||||
) -> ResourceThreads {
|
||||
ResourceThreads {
|
||||
core_thread: c,
|
||||
storage_thread: s,
|
||||
idb_thread: i,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,6 +446,16 @@ impl IpcSend<CoreResourceMsg> for ResourceThreads {
|
|||
}
|
||||
}
|
||||
|
||||
impl IpcSend<IndexedDBThreadMsg> for ResourceThreads {
|
||||
fn send(&self, msg: IndexedDBThreadMsg) -> IpcSendResult {
|
||||
self.idb_thread.send(msg)
|
||||
}
|
||||
|
||||
fn sender(&self) -> IpcSender<IndexedDBThreadMsg> {
|
||||
self.idb_thread.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl IpcSend<StorageThreadMsg> for ResourceThreads {
|
||||
fn send(&self, msg: StorageThreadMsg) -> IpcSendResult {
|
||||
self.storage_thread.send(msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue