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

Unified Diff: chrome/browser/dom_ui/dom_ui_factory.h

Issue 172120: Revert "Revert "Allow DOMUI pages to call window.open(), giving DOMUI privileges to the new"" (Closed)
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/dom_ui_factory.h
diff --git a/chrome/browser/dom_ui/dom_ui_factory.h b/chrome/browser/dom_ui/dom_ui_factory.h
index e4e36c3a39f2e891052c34051a2cf8dc049eeff6..db1500c9142e6f61ea8d2661a6b3a471e5f00181 100644
--- a/chrome/browser/dom_ui/dom_ui_factory.h
+++ b/chrome/browser/dom_ui/dom_ui_factory.h
@@ -11,8 +11,21 @@ class DOMUI;
class GURL;
class TabContents;
+// An opaque identifier used to identify a DOMUI. This can only be compared to
+// kNoDOMUI or other DOMUI types. See GetDOMUIType.
+typedef void* DOMUITypeID;
+
class DOMUIFactory {
public:
+ // A special DOMUI type that signifies that a given page would not use the
+ // DOM UI system.
+ static const DOMUITypeID kNoDOMUI;
+
+ // Returns a type identifier indicating what DOMUI we would use for the
+ // given URL. This is useful for comparing the potential DOMUIs for two URLs.
+ // Returns kNoDOMUI if the given URL will not use the DOM UI system.
+ static DOMUITypeID GetDOMUIType(const GURL& url);
+
// 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
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698