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

Unified Diff: webkit/glue/resource_type.h

Issue 20003004: reland crrev.com/212927 Move webkitplatformsupport_impl and related from glue to child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & allocator dep for components_unittests in shared_library2 Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/glue/resource_type.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/resource_type.h
diff --git a/webkit/glue/resource_type.h b/webkit/glue/resource_type.h
deleted file mode 100644
index f083806b2104e1f2f4522fbad9adb78fea00fee0..0000000000000000000000000000000000000000
--- a/webkit/glue/resource_type.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_GLUE_RESOURCE_TYPE_H__
-#define WEBKIT_GLUE_RESOURCE_TYPE_H__
-
-#include "base/basictypes.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "webkit/glue/webkit_glue_export.h"
-
-class ResourceType {
- public:
- // Used in histograms, so please add new types at the end, and rename unused
- // entries to RESOURCETYPE_UNUSED_0, etc...
- enum Type {
- MAIN_FRAME = 0, // top level page
- SUB_FRAME, // frame or iframe
- STYLESHEET, // a CSS stylesheet
- SCRIPT, // an external script
- IMAGE, // an image (jpg/gif/png/etc)
- FONT_RESOURCE, // a font
- SUB_RESOURCE, // an "other" subresource.
- OBJECT, // an object (or embed) tag for a plugin,
- // or a resource that a plugin requested.
- MEDIA, // a media resource.
- WORKER, // the main resource of a dedicated worker.
- SHARED_WORKER, // the main resource of a shared worker.
- PREFETCH, // an explicitly requested prefetch
- FAVICON, // a favicon
- XHR, // a XMLHttpRequest
- LAST_TYPE // Place holder so we don't need to change ValidType
- // everytime.
- };
-
- static bool ValidType(int32 type) {
- return type >= MAIN_FRAME && type < LAST_TYPE;
- }
-
- static Type FromInt(int32 type) {
- return static_cast<Type>(type);
- }
-
- WEBKIT_GLUE_EXPORT static Type FromTargetType(
- WebKit::WebURLRequest::TargetType type);
-
- static bool IsFrame(ResourceType::Type type) {
- 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 == WORKER ||
- type == XHR;
- }
-
- private:
- // Don't instantiate this class.
- ResourceType();
- ~ResourceType();
-};
-#endif // WEBKIT_GLUE_RESOURCE_TYPE_H__
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/glue/resource_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698