diff options
-rw-r--r-- | components/compositing/constellation.rs | 3 | ||||
-rw-r--r-- | components/net/image_cache_task.rs | 12 | ||||
-rw-r--r-- | components/net_traits/image_cache_task.rs | 12 |
3 files changed, 13 insertions, 14 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 7485f21e5bf..9f0e98e2e30 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -20,9 +20,8 @@ use msg::constellation_msg::{IFrameSandboxState, MozBrowserEvent, NavigationDire use msg::constellation_msg::{Key, KeyState, KeyModifiers, LoadData}; use msg::constellation_msg::{SubpageId, WindowSizeData}; use msg::constellation_msg::{self, ConstellationChan, Failure}; -use net::image_cache_task::ImageCacheTaskClient; use net_traits::{self, ResourceTask}; -use net_traits::image_cache_task::ImageCacheTask; +use net_traits::image_cache_task::{ImageCacheTask, ImageCacheTaskClient}; use net_traits::storage_task::{StorageTask, StorageTaskMsg}; use profile::mem; use profile::time; diff --git a/components/net/image_cache_task.rs b/components/net/image_cache_task.rs index 5897ee50fb2..a97d29b8d66 100644 --- a/components/net/image_cache_task.rs +++ b/components/net/image_cache_task.rs @@ -395,18 +395,6 @@ impl ImageCache { } } -pub trait ImageCacheTaskClient { - fn exit(&self); -} - -impl ImageCacheTaskClient for ImageCacheTask { - fn exit(&self) { - let (response_chan, response_port) = channel(); - self.send(Msg::Exit(response_chan)); - response_port.recv().unwrap(); - } -} - pub fn spawn_listener<F, A>(f: F) -> Sender<A> where F: FnOnce(Receiver<A>) + Send + 'static, A: Send + 'static diff --git a/components/net_traits/image_cache_task.rs b/components/net_traits/image_cache_task.rs index 2ce4d78dbf4..3dfbed3fde6 100644 --- a/components/net_traits/image_cache_task.rs +++ b/components/net_traits/image_cache_task.rs @@ -70,6 +70,18 @@ impl ImageCacheTask { } } +pub trait ImageCacheTaskClient { + fn exit(&self); +} + +impl ImageCacheTaskClient for ImageCacheTask { + fn exit(&self) { + let (response_chan, response_port) = channel(); + self.send(Msg::Exit(response_chan)); + response_port.recv().unwrap(); + } +} + pub fn load_image_data(url: Url, resource_task: ResourceTask, placeholder: &[u8]) -> Result<Vec<u8>, ()> { let (response_chan, response_port) = channel(); resource_task.send(ControlMsg::Load(LoadData::new(url.clone(), response_chan))).unwrap(); |