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

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

Issue 396503003: DomDistiller: fix 0 document width (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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 2d91dac66d7e3999b89a93843eae901ec26060f6..5efe9537cc4a614e711064971f8504788904ef35 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.cc
+++ b/components/dom_distiller/webui/dom_distiller_handler.cc
@@ -35,8 +35,10 @@ GURL GetViewUrlFromArgs(const std::string& scheme,
} // namespace
DomDistillerHandler::DomDistillerHandler(DomDistillerService* service,
- const std::string& scheme)
- : service_(service), article_scheme_(scheme), weak_ptr_factory_(this) {}
+ const std::string& scheme,
+ const gfx::Size& render_view_size)
+ : service_(service), article_scheme_(scheme),
+ render_view_size_(render_view_size), weak_ptr_factory_(this) {}
DomDistillerHandler::~DomDistillerHandler() {}
@@ -65,7 +67,7 @@ void DomDistillerHandler::HandleAddArticle(const base::ListValue* args) {
if (gurl.is_valid()) {
service_->AddToList(
gurl,
- service_->CreateDefaultDistillerPage(),
+ service_->CreateDefaultDistillerPage(render_view_size_),
base::Bind(base::Bind(&DomDistillerHandler::OnArticleAdded,
base::Unretained(this))));
} else {

Powered by Google App Engine
This is Rietveld 408576698