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

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

Issue 6966016: Handle <link rel=prerender> in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tone down the over-aggressive search and replace... Created 9 years, 7 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 | « net/url_request/url_request_http_job.cc ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PREFETCH, // an explicitly requested prefetch
26 PRERENDER, // an explicitly requested prerender
26 FAVICON, // a favicon 27 FAVICON, // a favicon
27 LAST_TYPE // Place holder so we don't need to change ValidType 28 LAST_TYPE // Place holder so we don't need to change ValidType
28 // everytime. 29 // everytime.
29 }; 30 };
30 31
31 static bool ValidType(int32 type) { 32 static bool ValidType(int32 type) {
32 return type >= MAIN_FRAME && type < LAST_TYPE; 33 return type >= MAIN_FRAME && type < LAST_TYPE;
33 } 34 }
34 35
35 static Type FromInt(int32 type) { 36 static Type FromInt(int32 type) {
(...skipping 16 matching lines...) Expand all
52 type == SUB_RESOURCE || 53 type == SUB_RESOURCE ||
53 type == WORKER; 54 type == WORKER;
54 } 55 }
55 56
56 private: 57 private:
57 // Don't instantiate this class. 58 // Don't instantiate this class.
58 ResourceType(); 59 ResourceType();
59 ~ResourceType(); 60 ~ResourceType();
60 }; 61 };
61 #endif // WEBKIT_GLUE_RESOURCE_TYPE_H__ 62 #endif // WEBKIT_GLUE_RESOURCE_TYPE_H__
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698