Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: webkit/common/resource_type.h

Issue 127713002: Add ServiceWorker resource type for ServiceWorker script loading (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/common/resource_type.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__ 5 #ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__
6 #define WEBKIT_COMMON_RESOURCE_TYPE_H__ 6 #define WEBKIT_COMMON_RESOURCE_TYPE_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/WebKit/public/platform/WebURLRequest.h" 9 #include "third_party/WebKit/public/platform/WebURLRequest.h"
10 #include "webkit/common/webkit_common_export.h" 10 #include "webkit/common/webkit_common_export.h"
(...skipping 12 matching lines...) Expand all
23 SUB_RESOURCE, // an "other" subresource. 23 SUB_RESOURCE, // an "other" subresource.
24 OBJECT, // an object (or embed) tag for a plugin, 24 OBJECT, // an object (or embed) tag for a plugin,
25 // or a resource that a plugin requested. 25 // or a resource that a plugin requested.
26 MEDIA, // a media resource. 26 MEDIA, // a media resource.
27 WORKER, // the main resource of a dedicated worker. 27 WORKER, // the main resource of a dedicated worker.
28 SHARED_WORKER, // the main resource of a shared worker. 28 SHARED_WORKER, // the main resource of a shared worker.
29 PREFETCH, // an explicitly requested prefetch 29 PREFETCH, // an explicitly requested prefetch
30 FAVICON, // a favicon 30 FAVICON, // a favicon
31 XHR, // a XMLHttpRequest 31 XHR, // a XMLHttpRequest
32 PING, // a ping request for <a ping> 32 PING, // a ping request for <a ping>
33 SERVICE_WORKER, // the main resource of a service worker.
33 LAST_TYPE // Place holder so we don't need to change ValidType 34 LAST_TYPE // Place holder so we don't need to change ValidType
34 // everytime. 35 // everytime.
35 }; 36 };
36 37
37 static bool ValidType(int32 type) { 38 static bool ValidType(int32 type) {
38 return type >= MAIN_FRAME && type < LAST_TYPE; 39 return type >= MAIN_FRAME && type < LAST_TYPE;
39 } 40 }
40 41
41 static Type FromInt(int32 type) { 42 static Type FromInt(int32 type) {
42 return static_cast<Type>(type); 43 return static_cast<Type>(type);
(...skipping 19 matching lines...) Expand all
62 type == WORKER || 63 type == WORKER ||
63 type == XHR; 64 type == XHR;
64 } 65 }
65 66
66 private: 67 private:
67 // Don't instantiate this class. 68 // Don't instantiate this class.
68 ResourceType(); 69 ResourceType();
69 ~ResourceType(); 70 ~ResourceType();
70 }; 71 };
71 #endif // WEBKIT_COMMON_RESOURCE_TYPE_H__ 72 #endif // WEBKIT_COMMON_RESOURCE_TYPE_H__
OLDNEW
« no previous file with comments | « no previous file | webkit/common/resource_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698