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

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

Issue 3050016: Implement prefetching in chrome (Closed)
Patch Set: merge to trunk Created 10 years, 4 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
« no previous file with comments | « net/url_request/url_request.h ('k') | webkit/glue/weburlloader_impl.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_GLUE_RESOURCE_TYPE_H__ 5 #ifndef WEBKIT_GLUE_RESOURCE_TYPE_H__
6 #define WEBKIT_GLUE_RESOURCE_TYPE_H__ 6 #define WEBKIT_GLUE_RESOURCE_TYPE_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 class ResourceType { 10 class ResourceType {
11 public: 11 public:
12 enum Type { 12 enum Type {
13 MAIN_FRAME = 0, // top level page 13 MAIN_FRAME = 0, // top level page
14 SUB_FRAME, // frame or iframe 14 SUB_FRAME, // frame or iframe
15 STYLESHEET, // a CSS stylesheet 15 STYLESHEET, // a CSS stylesheet
16 SCRIPT, // an external script 16 SCRIPT, // an external script
17 IMAGE, // an image (jpg/gif/png/etc) 17 IMAGE, // an image (jpg/gif/png/etc)
18 FONT_RESOURCE, // a font 18 FONT_RESOURCE, // a font
19 SUB_RESOURCE, // an "other" subresource. 19 SUB_RESOURCE, // an "other" subresource.
20 OBJECT, // an object (or embed) tag for a plugin, 20 OBJECT, // an object (or embed) tag for a plugin,
21 // or a resource that a plugin requested. 21 // or a resource that a plugin requested.
22 MEDIA, // a media resource. 22 MEDIA, // a media resource.
23 WORKER, // the main resource of a dedicated worker. 23 WORKER, // the main resource of a dedicated worker.
24 SHARED_WORKER, // the main resource of a shared worker. 24 SHARED_WORKER, // the main resource of a shared worker.
25 PREFETCH, // an explicitly requested prefetch
25 LAST_TYPE // Place holder so we don't need to change ValidType 26 LAST_TYPE // Place holder so we don't need to change ValidType
26 // everytime. 27 // everytime.
27 }; 28 };
28 29
29 static bool ValidType(int32 type) { 30 static bool ValidType(int32 type) {
30 return type >= MAIN_FRAME && type < LAST_TYPE; 31 return type >= MAIN_FRAME && type < LAST_TYPE;
31 } 32 }
32 33
33 static Type FromInt(int32 type) { 34 static Type FromInt(int32 type) {
34 return static_cast<Type>(type); 35 return static_cast<Type>(type);
(...skipping 15 matching lines...) Expand all
50 type == SUB_RESOURCE || 51 type == SUB_RESOURCE ||
51 type == WORKER; 52 type == WORKER;
52 } 53 }
53 54
54 private: 55 private:
55 // Don't instantiate this class. 56 // Don't instantiate this class.
56 ResourceType(); 57 ResourceType();
57 ~ResourceType(); 58 ~ResourceType();
58 }; 59 };
59 #endif // WEBKIT_GLUE_RESOURCE_TYPE_H__ 60 #endif // WEBKIT_GLUE_RESOURCE_TYPE_H__
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698