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

Side by Side Diff: content/public/common/resource_type.h

Issue 1515703005: WebRequest API: add more resource types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace == with && 2x Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_
6 #define CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Used in histograms; explicitly assign each type and do not re-use old values. 12 // Used in histograms; explicitly assign each type and do not re-use old values.
13 enum ResourceType { 13 enum ResourceType {
14 RESOURCE_TYPE_MAIN_FRAME = 0, // top level page 14 RESOURCE_TYPE_MAIN_FRAME = 0, // top level page
15 RESOURCE_TYPE_SUB_FRAME = 1, // frame or iframe 15 RESOURCE_TYPE_SUB_FRAME = 1, // frame or iframe
16 RESOURCE_TYPE_STYLESHEET = 2, // a CSS stylesheet 16 RESOURCE_TYPE_STYLESHEET = 2, // a CSS stylesheet
17 RESOURCE_TYPE_SCRIPT = 3, // an external script 17 RESOURCE_TYPE_SCRIPT = 3, // an external script
18 RESOURCE_TYPE_IMAGE = 4, // an image (jpg/gif/png/etc) 18 RESOURCE_TYPE_IMAGE = 4, // an image (jpg/gif/png/etc)
19 RESOURCE_TYPE_FONT_RESOURCE = 5, // a font 19 RESOURCE_TYPE_FONT_RESOURCE = 5, // a font
20 RESOURCE_TYPE_SUB_RESOURCE = 6, // an "other" subresource. 20 RESOURCE_TYPE_SUB_RESOURCE = 6, // an "other" subresource.
21 RESOURCE_TYPE_OBJECT = 7, // an object (or embed) tag for a plugin, 21 RESOURCE_TYPE_OBJECT = 7, // an object (or embed) tag for a plugin.
22 // or a resource that a plugin requested.
23 RESOURCE_TYPE_MEDIA = 8, // a media resource. 22 RESOURCE_TYPE_MEDIA = 8, // a media resource.
24 RESOURCE_TYPE_WORKER = 9, // the main resource of a dedicated 23 RESOURCE_TYPE_WORKER = 9, // the main resource of a dedicated
25 // worker. 24 // worker.
26 RESOURCE_TYPE_SHARED_WORKER = 10, // the main resource of a shared worker. 25 RESOURCE_TYPE_SHARED_WORKER = 10, // the main resource of a shared worker.
27 RESOURCE_TYPE_PREFETCH = 11, // an explicitly requested prefetch 26 RESOURCE_TYPE_PREFETCH = 11, // an explicitly requested prefetch
28 RESOURCE_TYPE_FAVICON = 12, // a favicon 27 RESOURCE_TYPE_FAVICON = 12, // a favicon
29 RESOURCE_TYPE_XHR = 13, // a XMLHttpRequest 28 RESOURCE_TYPE_XHR = 13, // a XMLHttpRequest
30 RESOURCE_TYPE_PING = 14, // a ping request for <a ping> 29 RESOURCE_TYPE_PING = 14, // a ping request for <a ping>/sendBeacon.
31 RESOURCE_TYPE_SERVICE_WORKER = 15, // the main resource of a service worker. 30 RESOURCE_TYPE_SERVICE_WORKER = 15, // the main resource of a service worker.
31 RESOURCE_TYPE_CSP_REPORT = 16, // a report of Content Security Policy
32 // violations.
33 RESOURCE_TYPE_PLUGIN_RESOURCE = 17, // a resource that a plugin requested.
32 RESOURCE_TYPE_LAST_TYPE 34 RESOURCE_TYPE_LAST_TYPE
33 }; 35 };
34 36
35 CONTENT_EXPORT bool IsResourceTypeFrame(ResourceType type); 37 CONTENT_EXPORT bool IsResourceTypeFrame(ResourceType type);
36 38
37 } // namespace content 39 } // namespace content
38 40
39 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ 41 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_
OLDNEW
« no previous file with comments | « content/child/web_url_request_util.cc ('k') | extensions/browser/api/web_request/web_request_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698