Chromium Code Reviews| Index: webkit/glue/resource_type.h |
| =================================================================== |
| --- webkit/glue/resource_type.h (revision 45253) |
| +++ webkit/glue/resource_type.h (working copy) |
| @@ -20,6 +20,8 @@ |
| OBJECT, // an object (or embed) tag for a plugin, |
| // or a resource that a plugin requested. |
| MEDIA, // a media resource. |
| + SHARED_WORKER, // the main resource of a shared worker. |
|
Andrew T Wilson (Slow)
2010/04/25 17:13:15
When workers perform XHR or load scripts like impo
michaeln
2010/04/26 21:51:53
I think right now all resources loaded by workers
|
| + WORKER, // the main resource of a dedicated worker. |
| LAST_TYPE // Place holder so we don't need to change ValidType |
| // everytime. |
| }; |
| @@ -36,12 +38,17 @@ |
| return type == MAIN_FRAME || type == SUB_FRAME; |
| } |
| + static bool IsSharedWorker(ResourceType::Type type) { |
| + return type == SHARED_WORKER; |
| + } |
| + |
| static bool IsSubresource(ResourceType::Type type) { |
| return type == STYLESHEET || |
| type == SCRIPT || |
| type == IMAGE || |
| type == FONT_RESOURCE || |
| - type == SUB_RESOURCE; |
| + type == SUB_RESOURCE || |
| + type == WORKER; |
| } |
| private: |