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

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

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 6 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 | « chrome/browser/dom_ui/dom_ui.cc ('k') | chrome/browser/extensions/extension_dom_ui.h » ('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.cc
diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc
index c5576cf1a25f69e1508e0c66b3eada8427391a67..8827c029c7cf8922e9f520c4501bd35c9eaf72fb 100644
--- a/chrome/browser/dom_ui/dom_ui_factory.cc
+++ b/chrome/browser/dom_ui/dom_ui_factory.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
#include "chrome/browser/extensions/extensions_ui.h"
+#include "chrome/browser/extensions/extension_dom_ui.h"
#include "chrome/common/url_constants.h"
#ifdef CHROME_PERSONALIZATION
#include "chrome/personalization/personalization.h"
@@ -34,6 +35,12 @@ static bool CreateDOMUI(const GURL& url, TabContents* tab_contents,
return true;
}
+ if (url.SchemeIs(chrome::kExtensionScheme)) {
+ if (new_ui)
+ *new_ui = new ExtensionDOMUI(tab_contents);
+ return true;
+ }
+
#ifdef CHROME_PERSONALIZATION
if (Personalization::NeedsDOMUI(url)) {
if (new_ui)
@@ -91,7 +98,8 @@ static bool CreateDOMUI(const GURL& url, TabContents* tab_contents,
// static
bool DOMUIFactory::HasDOMUIScheme(const GURL& url) {
return url.SchemeIs(chrome::kChromeInternalScheme) ||
- url.SchemeIs(chrome::kChromeUIScheme);
+ url.SchemeIs(chrome::kChromeUIScheme) ||
+ url.SchemeIs(chrome::kExtensionScheme);
}
// static
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.cc ('k') | chrome/browser/extensions/extension_dom_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698