OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Checks if the web_contents is has opengraph type=article markup. | 21 // Checks if the web_contents is has opengraph type=article markup. |
22 void IsOpenGraphArticle(content::WebContents* web_contents, | 22 void IsOpenGraphArticle(content::WebContents* web_contents, |
23 base::Callback<void(bool)> callback); | 23 base::Callback<void(bool)> callback); |
24 | 24 |
25 // Uses the provided DistillablePageDetector to detect if the page is | 25 // Uses the provided DistillablePageDetector to detect if the page is |
26 // distillable. The passed detector must be alive until after the callback is | 26 // distillable. The passed detector must be alive until after the callback is |
27 // called. | 27 // called. |
28 void IsDistillablePageForDetector(content::WebContents* web_contents, | 28 void IsDistillablePageForDetector(content::WebContents* web_contents, |
29 const DistillablePageDetector* detector, | 29 const DistillablePageDetector* detector, |
30 base::Callback<void(bool)> callback); | 30 base::Callback<void(bool)> callback); |
| 31 |
| 32 typedef base::Callback<void(bool, bool)> DistillabilityDelegate; |
| 33 |
| 34 // Set the delegate to receive the result of whether the page is distillable. |
| 35 void setDelegate(content::WebContents* web_contents, |
| 36 DistillabilityDelegate delegate); |
31 } | 37 } |
32 | 38 |
33 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ | 39 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_ |
OLD | NEW |