| Index: components/dom_distiller/content/distiller_page_web_contents.cc
|
| diff --git a/components/dom_distiller/content/distiller_page_web_contents.cc b/components/dom_distiller/content/distiller_page_web_contents.cc
|
| index 4c6ff1c6e07ca1eb93a07d35be8b7caa533f9afa..7ebe87a1104c39893207b355036af480066f4a2c 100644
|
| --- a/components/dom_distiller/content/distiller_page_web_contents.cc
|
| +++ b/components/dom_distiller/content/distiller_page_web_contents.cc
|
| @@ -34,11 +34,19 @@ scoped_ptr<content::WebContents> SourcePageHandleWebContents::GetWebContents() {
|
| return web_contents_.Pass();
|
| }
|
|
|
| +DistillerPageWebContentsFactory::DistillerPageWebContentsFactory(
|
| + content::BrowserContext* browser_context,
|
| + const std::string& distiller_js_script)
|
| + : DistillerPageFactory(),
|
| + browser_context_(browser_context),
|
| + distiller_js_script_(distiller_js_script) {
|
| +}
|
| +
|
| scoped_ptr<DistillerPage> DistillerPageWebContentsFactory::CreateDistillerPage(
|
| const gfx::Size& render_view_size) const {
|
| DCHECK(browser_context_);
|
| return scoped_ptr<DistillerPage>(new DistillerPageWebContents(
|
| - browser_context_, render_view_size,
|
| + browser_context_, render_view_size, distiller_js_script_,
|
| scoped_ptr<SourcePageHandleWebContents>()));
|
| }
|
|
|
| @@ -50,14 +58,18 @@ DistillerPageWebContentsFactory::CreateDistillerPageWithHandle(
|
| scoped_ptr<SourcePageHandleWebContents>(
|
| static_cast<SourcePageHandleWebContents*>(handle.release()));
|
| return scoped_ptr<DistillerPage>(new DistillerPageWebContents(
|
| - browser_context_, gfx::Size(), web_contents_handle.Pass()));
|
| + browser_context_, gfx::Size(), distiller_js_script_,
|
| + web_contents_handle.Pass()));
|
| }
|
|
|
| DistillerPageWebContents::DistillerPageWebContents(
|
| content::BrowserContext* browser_context,
|
| const gfx::Size& render_view_size,
|
| + const std::string& distiller_js_script,
|
| scoped_ptr<SourcePageHandleWebContents> optional_web_contents_handle)
|
| - : state_(IDLE), browser_context_(browser_context),
|
| + : DistillerPage(distiller_js_script),
|
| + state_(IDLE),
|
| + browser_context_(browser_context),
|
| render_view_size_(render_view_size) {
|
| if (optional_web_contents_handle) {
|
| web_contents_ = optional_web_contents_handle->GetWebContents().Pass();
|
|
|