Index: components/dom_distiller/core/distiller_page.h |
diff --git a/components/dom_distiller/core/distiller_page.h b/components/dom_distiller/core/distiller_page.h |
index 74cf277935b81809bb979aae01e37bac2aa2a2d0..ebe35b500c36801f54b0884214f5fdbfbde0d1aa 100644 |
--- a/components/dom_distiller/core/distiller_page.h |
+++ b/components/dom_distiller/core/distiller_page.h |
@@ -33,7 +33,10 @@ class DistillerPage { |
void(scoped_ptr<proto::DomDistillerResult> distilled_page, |
bool distillation_successful)> DistillerPageCallback; |
- DistillerPage(); |
+ // The passed in JavaScript should contain the string $$OPTIONS, which will be |
+ // replaced with options passed in as proto::DomDistillerOptions before it is |
+ // executed in the page context. |
+ explicit DistillerPage(const std::string& distiller_js_script); |
virtual ~DistillerPage(); |
// Loads a URL. |OnDistillationDone| is called when the load completes or |
@@ -51,13 +54,21 @@ class DistillerPage { |
protected: |
// Called by |DistillPage| to carry out platform-specific instructions to load |
- // and distill the |url| using the provided |script|. The extracted content |
- // should be the same regardless of the DistillerPage implementation. |
+ // and distill the |url|. The extracted content should be the same regardless |
+ // of the DistillerPage implementation. |
virtual void DistillPageImpl(const GURL& url, const std::string& script) = 0; |
noyau (Ping after 24h)
2015/03/11 14:30:59
The comment should specify that the options have b
|
private: |
bool ready_; |
+ |
+ // Contains the script which will be injected into the page which is |
+ // being distilled. It should contain the string $$OPTIONS, which will be |
+ // replaced with options passed in as proto::DomDistillerOptions before |
+ // it is executed in the page context. |
+ std::string distiller_js_script_; |
+ |
DistillerPageCallback distiller_page_callback_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DistillerPage); |
}; |