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

Unified Diff: components/dom_distiller/core/viewer.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
« no previous file with comments | « components/dom_distiller/core/viewer.h ('k') | components/dom_distiller/core/viewer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/viewer.cc
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 8a9d9372351d5a1115268aad96b5f931f2fa6f0f..be8463a3c67866bf2fc7a5efab6a58335f26232d 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -177,7 +177,8 @@ const std::string GetJavaScript() {
scoped_ptr<ViewerHandle> CreateViewRequest(
DomDistillerServiceInterface* dom_distiller_service,
const std::string& path,
- ViewRequestDelegate* view_request_delegate) {
+ ViewRequestDelegate* view_request_delegate,
+ const gfx::Size& render_view_size) {
std::string entry_id =
url_utils::GetValueForKeyInUrlPathQuery(path, kEntryIdKey);
bool has_valid_entry_id = !entry_id.empty();
@@ -195,15 +196,15 @@ scoped_ptr<ViewerHandle> CreateViewRequest(
}
if (has_valid_entry_id) {
- return dom_distiller_service->ViewEntry(view_request_delegate,
- dom_distiller_service
- ->CreateDefaultDistillerPage(),
- entry_id).Pass();
+ return dom_distiller_service->ViewEntry(
+ view_request_delegate,
+ dom_distiller_service->CreateDefaultDistillerPage(render_view_size),
+ entry_id).Pass();
} else if (has_valid_url) {
- return dom_distiller_service->ViewUrl(view_request_delegate,
- dom_distiller_service
- ->CreateDefaultDistillerPage(),
- requested_url).Pass();
+ return dom_distiller_service->ViewUrl(
+ view_request_delegate,
+ dom_distiller_service->CreateDefaultDistillerPage(render_view_size),
+ requested_url).Pass();
}
// It is invalid to not specify a query param for |kEntryIdKey| or |kUrlKey|.
« no previous file with comments | « components/dom_distiller/core/viewer.h ('k') | components/dom_distiller/core/viewer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698