| 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..76bbab677d26911261bcf03a83dde0086017a36c 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"
|
| @@ -178,6 +179,15 @@ WebUIController* NewWebUI<chromeos::OobeUI>(WebUI* web_ui, const GURL& url) {
|
| }
|
| #endif
|
|
|
| +// Special case for DOM distiller.
|
| +template<>
|
| +WebUIController* NewWebUI<dom_distiller::DomDistillerUI>(WebUI* web_ui,
|
| + const GURL& url) {
|
| + return new dom_distiller::DomDistillerUI(web_ui,
|
| + url,
|
| + chrome::kChromeUIDomDistillerHost);
|
| +}
|
| +
|
| // Only create ExtensionWebUI for URLs that are allowed extension bindings,
|
| // hosted by actual tabs.
|
| bool NeedsExtensionWebUI(Profile* profile, 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)
|
|
|