summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/dom_ui_factory.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 22:45:34 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 22:45:34 +0000
commitb689fce776a394377fed51ae063942509a2988a1 (patch)
treeeb52e9944db424e9e1b80bcefe9b9b96b1c27b50 /chrome/browser/dom_ui/dom_ui_factory.h
parent84ae20cba3059760948ca5d1f313dc25c74b26d6 (diff)
downloadchromium_src-b689fce776a394377fed51ae063942509a2988a1.zip
chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.gz
chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.bz2
Merge DOMUIContents into WebContents.
I did a lot of cleanup of the DOM UI system as part of this. Review URL: http://codereview.chromium.org/42227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/dom_ui_factory.h')
-rw-r--r--chrome/browser/dom_ui/dom_ui_factory.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_factory.h b/chrome/browser/dom_ui/dom_ui_factory.h
new file mode 100644
index 0000000..1641a8a
--- /dev/null
+++ b/chrome/browser/dom_ui/dom_ui_factory.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2009 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 CHROME_BROWSER_DOM_UI_DOM_UI_FACTORY_H_
+#define CHROME_BROWSER_DOM_UI_DOM_UI_FACTORY_H_
+
+class DOMUI;
+class GURL;
+class WebContents;
+
+class DOMUIFactory {
+ public:
+ // Returns true if the given URL's scheme would trigger the DOM UI system.
+ // This is a less precise test than UseDONUIForURL, which tells you whether
+ // that specific URL matches a known one. This one is faster and can be used
+ // to determine security policy.
+ static bool HasDOMUIScheme(const GURL& url);
+
+ // Returns true if the given URL will use the DOM UI system.
+ static bool UseDOMUIForURL(const GURL& url);
+
+ // Allocates a new DOMUI object for the given URL, and returns it. If the URL
+ // is not a DOM UI URL, then it will return NULL. When non-NULL, ownership of
+ // the returned pointer is passed to the caller.
+ static DOMUI* CreateDOMUIForURL(WebContents* web_contents, const GURL& url);
+
+ private:
+ // Class is for scoping only.
+ DOMUIFactory() {};
+};
+
+#endif // CHROME_BROWSER_DOM_UI_DOM_UI_FACTORY_H_