servo: Merge #8454 - Implement basic <media> infrastructure (from jdm:media); r=KiChjang

This gets us to the point where we can start playing with actually integrating rust-media to process the data received by the network request, as currently it's just ignored.

Source-Repo: https://github.com/servo/servo
Source-Revision: f9d9cd3aaed3326e8935f710f800288a50156c71
This commit is contained in:
Josh Matthews
2016-05-03 16:42:46 -07:00
parent 195ce9ea2b
commit 2aa3feb6cb
11 changed files with 912 additions and 25 deletions

View File

@@ -21,6 +21,7 @@ pub enum LoadType {
Subframe(Url),
Stylesheet(Url),
PageSource(Url),
Media(Url),
}
impl LoadType {
@@ -30,6 +31,7 @@ impl LoadType {
LoadType::Script(ref url) |
LoadType::Subframe(ref url) |
LoadType::Stylesheet(ref url) |
LoadType::Media(ref url) |
LoadType::PageSource(ref url) => url,
}
}
@@ -39,7 +41,8 @@ impl LoadType {
LoadType::Image(_) => LoadContext::Image,
LoadType::Script(_) => LoadContext::Script,
LoadType::Subframe(_) | LoadType::PageSource(_) => LoadContext::Browsing,
LoadType::Stylesheet(_) => LoadContext::Style
LoadType::Stylesheet(_) => LoadContext::Style,
LoadType::Media(_) => LoadContext::AudioVideo,
}
}
}