Use common cookie struct add cookie webdriver cmds

One cookie struct to rule them all. One struct to represent them.
One cookie struct to bind them all, and through the IPC carry them.
This commit is contained in:
Dan Robertson 2016-06-25 20:06:17 +00:00
parent 7d978e7b3d
commit 246723114f
No known key found for this signature in database
GPG key ID: 1BE34CFA559DED58
19 changed files with 214 additions and 23 deletions

View file

@ -12,6 +12,7 @@
#![deny(unsafe_code)]
extern crate cookie as cookie_rs;
extern crate heapsize;
extern crate hyper;
extern crate image as piston_image;
@ -28,6 +29,7 @@ extern crate util;
extern crate uuid;
extern crate websocket;
use cookie_rs::Cookie;
use filemanager_thread::FileManagerThreadMsg;
use heapsize::HeapSizeOf;
use hyper::header::{ContentType, Headers};
@ -423,8 +425,12 @@ pub enum CoreResourceMsg {
WebsocketConnect(WebSocketCommunicate, WebSocketConnectData),
/// Store a set of cookies for a given originating URL
SetCookiesForUrl(Url, String, CookieSource),
/// Store a set of cookies for a given originating URL
SetCookiesForUrlWithData(Url, Cookie, CookieSource),
/// Retrieve the stored cookies for a given URL
GetCookiesForUrl(Url, IpcSender<Option<String>>, CookieSource),
/// Get a cookie by name for a given originating URL
GetCookiesDataForUrl(Url, IpcSender<Vec<Cookie>>, CookieSource),
/// Cancel a network request corresponding to a given `ResourceId`
Cancel(ResourceId),
/// Synchronization message solely for knowing the state of the ResourceChannelManager loop