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

Unified Diff: components/dom_distiller/webui/dom_distiller_handler.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years 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 | « components/dom_distiller.gypi ('k') | components/dom_distiller/webui/dom_distiller_viewer_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/webui/dom_distiller_handler.cc
diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc
index 6202de7d7e4dd062fbafe251a8fe264e60cb3f99..ecec2195d891a4305e6f00bb26f87564065d26ef 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.cc
+++ b/components/dom_distiller/webui/dom_distiller_handler.cc
@@ -8,6 +8,7 @@
#include "base/values.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
#include "components/dom_distiller/core/proto/distilled_page.pb.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "url/gurl.h"
@@ -51,7 +52,11 @@ void DomDistillerHandler::HandleSelectArticle(const ListValue* args) {
std::string entry_id;
args->GetString(0, &entry_id);
- // TODO(nyquist): Do something here.
+ GURL url(article_scheme_ + std::string("://") + entry_id);
+ DCHECK(url.is_valid());
+ web_ui()->GetWebContents()->GetController().LoadURL(url,
Tom Sepez 2013/12/05 19:25:52 @creis - would this load into the same renderer as
Charlie Reis 2013/12/06 22:09:32 That depends on whether chrome-distiller:// URLs h
nyquist 2013/12/06 22:25:44 chrome-distiller:// does use a WebUI to render thi
Charlie Reis 2013/12/06 22:33:03 I don't think this won't guarantee that. If the u
nyquist 2014/01/08 02:00:41 Changed to implement as a data source instead.
+ content::Referrer(), content::PAGE_TRANSITION_GENERATED,
+ std::string());
}
void DomDistillerHandler::HandleRequestEntries(const ListValue* args) {
« no previous file with comments | « components/dom_distiller.gypi ('k') | components/dom_distiller/webui/dom_distiller_viewer_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698