Chromium Code Reviews| Index: components/dom_distiller/core/dom_distiller_service.h |
| diff --git a/components/dom_distiller/core/dom_distiller_service.h b/components/dom_distiller/core/dom_distiller_service.h |
| index 5d2558d1142b68467f6434f8b538663a16cd7762..1b4c627a54729c9bc3da563352d960b13ebb1652 100644 |
| --- a/components/dom_distiller/core/dom_distiller_service.h |
| +++ b/components/dom_distiller/core/dom_distiller_service.h |
| @@ -92,6 +92,18 @@ class DomDistillerServiceInterface { |
| scoped_ptr<DistillerPage> distiller_page, |
| const GURL& url) = 0; |
| + // Adds |delegate| to the provided |url| task tracker. |
| + // If the given |url| has no task tracker (i.e. has no current |
| + // distillation request underway), this will return nullptr - therefore |
| + // this should only be called after previously requesting a distillation. |
| + // If the inclusion of |delegate| on the |url| task tracker was |
| + // successful, returns a |ViewerHandle| from the task tracker. This |
| + // |ViewerHandle| can be held by client code as long as it wants to |
| + // receive callbacks as a |ViewRequestDelegate|. |
|
nyquist
2016/02/11 15:57:53
Could you expand this comment with a sentence abou
mvendramini_hp
2016/02/11 19:00:46
I propose we either cross-reference the callbacks
nyquist
2016/02/17 23:09:38
So, the guarantee is:
- If this function returns n
mvendramini_hp
2016/02/18 12:27:02
Done, expanded the doc-comment, please check it ou
|
| + virtual scoped_ptr<ViewerHandle> AddViewRequestDelegate( |
| + ViewRequestDelegate* delegate, |
| + const GURL& url) = 0; |
| + |
| // Creates a default DistillerPage. |
| virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage( |
| const gfx::Size& render_view_size) = 0; |
| @@ -137,6 +149,8 @@ class DomDistillerService : public DomDistillerServiceInterface { |
| scoped_ptr<ViewerHandle> ViewUrl(ViewRequestDelegate* delegate, |
| scoped_ptr<DistillerPage> distiller_page, |
| const GURL& url) override; |
| + scoped_ptr<ViewerHandle> AddViewRequestDelegate(ViewRequestDelegate* delegate, |
| + const GURL& url) override; |
| scoped_ptr<DistillerPage> CreateDefaultDistillerPage( |
| const gfx::Size& render_view_size) override; |
| scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( |