Auto merge of #11443 - kyleheadley:remove_trait_11339, r=asajeffrey

Remove CompositorEventListener trait

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11339 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11443)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-01 14:06:41 -05:00
commit c641ec97f0
6 changed files with 41 additions and 53 deletions

View file

@ -57,11 +57,10 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
#[cfg(not(feature = "webdriver"))]
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
use compositing::CompositorEventListener;
use compositing::compositor_thread::InitialCompositorState;
use compositing::windowing::WindowEvent;
use compositing::windowing::WindowMethods;
use compositing::{CompositorProxy, CompositorThread};
use compositing::{CompositorProxy, CompositorThread, IOCompositor};
#[cfg(not(target_os = "windows"))]
use constellation::content_process_sandbox_profile;
use constellation::{Constellation, InitialConstellationState, UnprivilegedPipelineContent};
@ -97,13 +96,12 @@ pub use gleam::gl;
/// application Servo is embedded in. Clients then create an event
/// loop to pump messages between the embedding application and
/// various browser components.
pub struct Browser {
compositor: Box<CompositorEventListener + 'static>,
pub struct Browser<Window: WindowMethods + 'static> {
compositor: IOCompositor<Window>,
}
impl Browser {
pub fn new<Window>(window: Rc<Window>) -> Browser
where Window: WindowMethods + 'static {
impl<Window> Browser<Window> where Window: WindowMethods + 'static {
pub fn new(window: Rc<Window>) -> Browser<Window> {
// Global configuration options, parsed from the command line.
let opts = opts::get();

View file

@ -98,7 +98,7 @@ fn unregister_glutin_resize_handler(window: &Rc<app::window::Window>) {
}
struct BrowserWrapper {
browser: Browser,
browser: Browser<app::window::Window>,
}
impl app::NestedEventLoopListener for BrowserWrapper {