Index: components/dom_distiller/webui/dom_distiller_handler.h |
diff --git a/components/dom_distiller/webui/dom_distiller_handler.h b/components/dom_distiller/webui/dom_distiller_handler.h |
index 24a951d5086e7139970f7cb843d82269f11f1f52..fe253ed3bbc85d0e1528d711fa5617281e51d7d3 100644 |
--- a/components/dom_distiller/webui/dom_distiller_handler.h |
+++ b/components/dom_distiller/webui/dom_distiller_handler.h |
@@ -19,8 +19,7 @@ class DomDistillerService; |
class DomDistillerHandler : public content::WebUIMessageHandler { |
public: |
// The lifetime of |service| has to outlive this handler. |
- DomDistillerHandler(DomDistillerService* service, |
- const std::string& scheme); |
+ DomDistillerHandler(DomDistillerService* service, const std::string& scheme); |
virtual ~DomDistillerHandler(); |
// content::WebUIMessageHandler implementation. |
@@ -40,10 +39,20 @@ class DomDistillerHandler : public content::WebUIMessageHandler { |
// selected. |
void HandleSelectArticle(const base::ListValue* args); |
+ // Callback from JavaScript for when viewing a URL is requested. The first |
+ // element in |args| should be a string representing the URL to be viewed. |
+ void HandleViewUrl(const base::ListValue* args); |
+ |
private: |
// Callback from DomDistillerService when an article is available. |
void OnArticleAdded(bool article_available); |
+ // Helper function to create URLs for viewing distilled content for an entry. |
+ const GURL GetDistillerViewUrlFromEntryId(const std::string& entry_id) const; |
+ |
+ // Helper function to create URLs for viewing distilled content for a URL. |
+ const GURL GetDistillerViewUrlFromUrl(const GURL& view_url) const; |
+ |
// The DomDistillerService. |
DomDistillerService* service_; |