diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 00:53:35 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 00:53:35 +0000 |
commit | c0b332b0558f47039aa7c56d26ebc3ed364e7d4d (patch) | |
tree | c0c16d9b6c1209e2538d11f1f12a89f8330412ec | |
parent | 2667e87f35afb1c75d80cff70696d8fd71e512cf (diff) | |
download | chromium_src-c0b332b0558f47039aa7c56d26ebc3ed364e7d4d.zip chromium_src-c0b332b0558f47039aa7c56d26ebc3ed364e7d4d.tar.gz chromium_src-c0b332b0558f47039aa7c56d26ebc3ed364e7d4d.tar.bz2 |
Add a MEDIA resource to webkit port and glue code so that
we can have special handlings on media resources
Review URL: http://codereview.chromium.org/12858
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6262 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/resource_handle_impl.cc | 2 | ||||
-rw-r--r-- | webkit/glue/resource_type.h | 5 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/ResourceRequest.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/webkit/glue/resource_handle_impl.cc b/webkit/glue/resource_handle_impl.cc index 37528d6..322e0b8 100644 --- a/webkit/glue/resource_handle_impl.cc +++ b/webkit/glue/resource_handle_impl.cc @@ -75,6 +75,8 @@ static ResourceType::Type FromTargetType(ResourceRequest::TargetType type) { return ResourceType::SUB_RESOURCE; case ResourceRequest::TargetIsObject: return ResourceType::OBJECT; + case ResourceRequest::TargetIsMedia: + return ResourceType::MEDIA; default: NOTREACHED(); return ResourceType::SUB_RESOURCE; diff --git a/webkit/glue/resource_type.h b/webkit/glue/resource_type.h index 1d8e22b..98091b6 100644 --- a/webkit/glue/resource_type.h +++ b/webkit/glue/resource_type.h @@ -15,10 +15,13 @@ class ResourceType { SUB_RESOURCE, // a resource like images, js, css OBJECT, // an object (or embed) tag for a plugin, // or a resource that a plugin requested. + MEDIA, // a media resource. + LAST_TYPE // Place holder so we don't need to change ValidType + // everytime. }; static bool ValidType(int32 type) { - return type >= MAIN_FRAME && type <= OBJECT; + return type >= MAIN_FRAME && type < LAST_TYPE; } static Type FromInt(int32 type) { diff --git a/webkit/port/platform/network/chromium/ResourceRequest.h b/webkit/port/platform/network/chromium/ResourceRequest.h index a0c1bb7..8e142c68 100644 --- a/webkit/port/platform/network/chromium/ResourceRequest.h +++ b/webkit/port/platform/network/chromium/ResourceRequest.h @@ -41,7 +41,8 @@ namespace WebCore { TargetIsMainFrame, TargetIsSubFrame, TargetIsSubResource, - TargetIsObject + TargetIsObject, + TargetIsMedia }; ResourceRequest(const String& url) |