aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
authorOJ Kwon <kwon.ohjoong@gmail.com>2018-04-17 19:46:02 -0700
committerOJ Kwon <kwon.ohjoong@gmail.com>2018-04-18 11:39:33 -0700
commit61b4a891bb188835842683800d6e97cecfd81609 (patch)
tree4d722f5f0403022842eb11eda7b4280919b65ce2 /components/servo/lib.rs
parent5574b4212632dfbf661a7813ccd9cc670c23a0d0 (diff)
downloadservo-61b4a891bb188835842683800d6e97cecfd81609.tar.gz
servo-61b4a891bb188835842683800d6e97cecfd81609.zip
refactor(bluetooth): uses embedderproxy directly
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index b6f95e28a52..3b7973ba203 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -67,7 +67,8 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
#[cfg(not(feature = "webdriver"))]
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
-use bluetooth::new_bluetooth_thread;
+use bluetooth::BluetoothThreadFactory;
+use bluetooth_traits::BluetoothRequest;
use canvas::gl_context::GLContextFactory;
use canvas::webgl_thread::WebGLThreads;
use compositing::{IOCompositor, ShutdownState, RenderNotifier};
@@ -457,7 +458,7 @@ fn create_constellation(user_agent: Cow<'static, str>,
webrender_api_sender: webrender_api::RenderApiSender,
window_gl: Rc<gl::Gl>)
-> (Sender<ConstellationMsg>, SWManagerSenders) {
- let (bluetooth_thread, bluetooth_constellation_sender) = new_bluetooth_thread();
+ let bluetooth_thread: IpcSender<BluetoothRequest> = BluetoothThreadFactory::new(embedder_proxy.clone());
let (public_resource_threads, private_resource_threads) =
new_resource_threads(user_agent,
@@ -525,9 +526,7 @@ fn create_constellation(user_agent: Cow<'static, str>,
webgl_threads,
webvr_chan,
};
- let (constellation_chan,
- from_swmanager_sender,
- from_bluetoothmanager_sender) =
+ let (constellation_chan, from_swmanager_sender) =
Constellation::<script_layout_interface::message::Msg,
layout_thread::LayoutThread,
script::script_thread::ScriptThread>::start(initial_state);
@@ -537,8 +536,6 @@ fn create_constellation(user_agent: Cow<'static, str>,
webvr_constellation_sender.send(constellation_chan.clone()).unwrap();
}
- bluetooth_constellation_sender.send(from_bluetoothmanager_sender.clone()).unwrap();
-
// channels to communicate with Service Worker Manager
let sw_senders = SWManagerSenders {
swmanager_sender: from_swmanager_sender,