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

Unified Diff: components/dom_distiller/standalone/content_extractor.cc

Issue 396503003: DomDistiller: fix 0 document width (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve patch conflicts Created 6 years, 5 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
Index: components/dom_distiller/standalone/content_extractor.cc
diff --git a/components/dom_distiller/standalone/content_extractor.cc b/components/dom_distiller/standalone/content_extractor.cc
index accc0d3d658f9192ad927d54f4d8680fd7d97d46..89446e21ab013c52bc472c353f1a8d7d9165fe92 100644
--- a/components/dom_distiller/standalone/content_extractor.cc
+++ b/components/dom_distiller/standalone/content_extractor.cc
@@ -151,10 +151,13 @@ std::string GetReadableArticleString(
class ContentExtractionRequest : public ViewRequestDelegate {
public:
- void Start(DomDistillerService* service, base::Closure finished_callback) {
+ void Start(DomDistillerService* service, const gfx::Size& render_view_size,
+ base::Closure finished_callback) {
finished_callback_ = finished_callback;
viewer_handle_ =
- service->ViewUrl(this, service->CreateDefaultDistillerPage(), url_);
+ service->ViewUrl(this,
+ service->CreateDefaultDistillerPage(render_view_size),
+ url_);
}
DistilledArticleProto GetArticleCopy() {
@@ -252,6 +255,7 @@ class ContentExtractor : public ContentBrowserTest {
while (pending_tasks_ < max_tasks_ && next_request_ < requests_.size()) {
requests_[next_request_]->Start(
service_.get(),
+ shell()->web_contents()->GetContainerBounds().size(),
base::Bind(&ContentExtractor::FinishRequest, base::Unretained(this)));
++next_request_;
++pending_tasks_;
« no previous file with comments | « components/dom_distiller/core/viewer_unittest.cc ('k') | components/dom_distiller/webui/dom_distiller_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698