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

Unified Diff: components/dom_distiller/content/distiller_page_web_contents.h

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/content/distiller_page_web_contents.h
diff --git a/components/dom_distiller/content/distiller_page_web_contents.h b/components/dom_distiller/content/distiller_page_web_contents.h
index d7388544f5d144c0afbd131b9f1b357c8f22b857..a7e5a298f0c7275de0c0b22a748206fe57ce761a 100644
--- a/components/dom_distiller/content/distiller_page_web_contents.h
+++ b/components/dom_distiller/content/distiller_page_web_contents.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "components/dom_distiller/core/distiller_page.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
@@ -35,7 +36,8 @@ class DistillerPageWebContentsFactory : public DistillerPageFactory {
: DistillerPageFactory(), browser_context_(browser_context) {}
virtual ~DistillerPageWebContentsFactory() {}
- virtual scoped_ptr<DistillerPage> CreateDistillerPage() const OVERRIDE;
+ virtual scoped_ptr<DistillerPage> CreateDistillerPage(
+ const gfx::Size& render_view_size) const OVERRIDE;
virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle(
scoped_ptr<SourcePageHandle> handle) const OVERRIDE;
@@ -44,13 +46,19 @@ class DistillerPageWebContentsFactory : public DistillerPageFactory {
};
class DistillerPageWebContents : public DistillerPage,
+ public content::WebContentsDelegate,
public content::WebContentsObserver {
public:
DistillerPageWebContents(
content::BrowserContext* browser_context,
+ const gfx::Size& render_view_size,
scoped_ptr<SourcePageHandleWebContents> optional_web_contents_handle);
virtual ~DistillerPageWebContents();
+ // content::WebContentsDelegate implementation.
+ virtual gfx::Size GetSizeForNewRenderView(
+ content::WebContents* web_contents) const OVERRIDE;
+
// content::WebContentsObserver implementation.
virtual void DocumentLoadedInFrame(
content::RenderFrameHost* render_frame_host) OVERRIDE;
@@ -99,6 +107,7 @@ class DistillerPageWebContents : public DistillerPage,
scoped_ptr<content::WebContents> web_contents_;
content::BrowserContext* browser_context_;
+ gfx::Size render_view_size_;
DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents);
};

Powered by Google App Engine
This is Rietveld 408576698