| 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 80b7a9eb800f52954d81556f19249c955b0fd748..82abe8d530c69155b91bee19b31b41d537a743c8 100644
|
| --- a/components/dom_distiller/content/distiller_page_web_contents.h
|
| +++ b/components/dom_distiller/content/distiller_page_web_contents.h
|
| @@ -18,15 +18,17 @@ namespace dom_distiller {
|
|
|
| class SourcePageHandleWebContents : public SourcePageHandle {
|
| public:
|
| - explicit SourcePageHandleWebContents(
|
| - scoped_ptr<content::WebContents> web_contents);
|
| + SourcePageHandleWebContents(content::WebContents* web_contents, bool owned);
|
| ~SourcePageHandleWebContents() override;
|
|
|
| - scoped_ptr<content::WebContents> GetWebContents();
|
| + // Retreives the WebContents. The SourcePageHandleWebContents keeps ownership.
|
| + content::WebContents* web_contents() { return web_contents_; }
|
|
|
| private:
|
| - // The WebContents this class owns.
|
| - scoped_ptr<content::WebContents> web_contents_;
|
| + // The WebContents this class holds.
|
| + content::WebContents* web_contents_;
|
| + // Whether this owns |web_contents_|.
|
| + bool owned_;
|
| };
|
|
|
| class DistillerPageWebContentsFactory : public DistillerPageFactory {
|
| @@ -106,7 +108,8 @@ class DistillerPageWebContents : public DistillerPage,
|
| // The JavaScript to inject to extract content.
|
| std::string script_;
|
|
|
| - scoped_ptr<content::WebContents> web_contents_;
|
| + scoped_ptr<SourcePageHandleWebContents> source_page_handle_;
|
| +
|
| content::BrowserContext* browser_context_;
|
| gfx::Size render_view_size_;
|
| DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents);
|
|
|