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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 23503042: Initial WebUI for DOM Distiller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload of previous patchset Created 7 years, 3 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/ui/webui/DEPS ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 6d2018ea4aed1f5939228bf2fff827744ea75aa2..4b7bad53cfb3691ada85c14f683376a9656a7645 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -55,6 +55,7 @@
#include "chrome/common/extensions/feature_switch.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/dom_distiller/webui/dom_distiller_ui.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/content_client.h"
@@ -159,6 +160,15 @@ WebUIController* NewWebUI<ExtensionWebUI>(WebUI* web_ui,
return new ExtensionWebUI(web_ui, url);
}
+// Special case for DOM distiller.
Evan Stade 2013/09/10 21:41:16 you should not put this in between the other two e
nyquist 2013/09/10 22:11:41 Done.
+template<>
+WebUIController* NewWebUI<dom_distiller::DomDistillerUI>(WebUI* web_ui,
+ const GURL& url) {
+ return new dom_distiller::DomDistillerUI(web_ui,
+ url,
+ chrome::kChromeUIDomDistillerHost);
+}
+
template<>
WebUIController* NewWebUI<extensions::ExtensionInfoUI>(WebUI* web_ui,
const GURL& url) {
@@ -237,6 +247,11 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<LocalDiscoveryUI>;
}
#endif
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableDomDistiller) &&
+ url.host() == chrome::kChromeUIDomDistillerHost) {
+ return &NewWebUI<dom_distiller::DomDistillerUI>;
+ }
if (url.host() == chrome::kChromeUIFlagsHost)
return &NewWebUI<FlagsUI>;
if (url.host() == chrome::kChromeUIHistoryFrameHost)
« no previous file with comments | « chrome/browser/ui/webui/DEPS ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698