| 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 bc20047a9cbf49311879520a4e9f2210d5cc2dea..b766953aaec9d9dd5061d10b146db0d8d4ec6404 100644
|
| --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
| +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
| @@ -58,6 +58,7 @@
|
| #include "components/dom_distiller/core/dom_distiller_constants.h"
|
| #include "components/dom_distiller/core/dom_distiller_service.h"
|
| #include "components/dom_distiller/webui/dom_distiller_ui.h"
|
| +#include "components/dom_distiller/webui/dom_distiller_viewer_ui.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_ui.h"
|
| #include "content/public/common/content_client.h"
|
| @@ -199,8 +200,9 @@ WebUIController* NewWebUI<dom_distiller::DomDistillerUi>(WebUI* web_ui,
|
| dom_distiller::DomDistillerService* service =
|
| dom_distiller::DomDistillerServiceFactory::GetForBrowserContext(
|
| browser_context);
|
| - // TODO(nyquist): Add real scheme.
|
| - return new dom_distiller::DomDistillerUi(web_ui, service, "dummy");
|
| + return new dom_distiller::DomDistillerUi(web_ui,
|
| + service,
|
| + chrome::kDomDistillerScheme);
|
| }
|
|
|
| // Only create ExtensionWebUI for URLs that are allowed extension bindings,
|
| @@ -225,7 +227,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
| // schemes to filter out most URLs.
|
| if (!url.SchemeIs(chrome::kChromeDevToolsScheme) &&
|
| !url.SchemeIs(chrome::kChromeInternalScheme) &&
|
| - !url.SchemeIs(chrome::kChromeUIScheme)) {
|
| + !url.SchemeIs(chrome::kChromeUIScheme) &&
|
| + !url.SchemeIs(chrome::kDomDistillerScheme)) {
|
| return NULL;
|
| }
|
|
|
| @@ -494,7 +497,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
|
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableDomDistiller)) {
|
| - if (url.host() == dom_distiller::kChromeUIDomDistillerHost) {
|
| + if (url.SchemeIs(chrome::kDomDistillerScheme)) {
|
| + return &NewWebUI<dom_distiller::DomDistillerViewerUi>;
|
| + } else if (url.host() == dom_distiller::kChromeUIDomDistillerHost) {
|
| return &NewWebUI<dom_distiller::DomDistillerUi>;
|
| }
|
| }
|
|
|