| 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_DISTILLABLE_PAGE_UTILS_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_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 |
| 11 namespace dom_distiller { | 11 namespace dom_distiller { |
| 12 | 12 |
| 13 class DistillablePageDetector; | 13 class DistillablePageDetector; |
| 14 | 14 |
| 15 void IsDistillablePage(content::WebContents* web_contents, |
| 16 base::Callback<void(bool)> callback); |
| 17 |
| 18 // Checks if the web_contents is has opengraph type=article markup. |
| 15 void IsOpenGraphArticle(content::WebContents* web_contents, | 19 void IsOpenGraphArticle(content::WebContents* web_contents, |
| 16 base::Callback<void(bool)> callback); | 20 base::Callback<void(bool)> callback); |
| 17 void IsDistillablePage(content::WebContents* web_contents, | 21 |
| 18 base::Callback<void(bool)> callback); | 22 // Uses the provided DistillablePageDetector to detect if the page is |
| 19 // The passed detector must be alive until after the callback is called. | 23 // distillable. The passed detector must be alive until after the callback is |
| 24 // called. |
| 20 void IsDistillablePageForDetector(content::WebContents* web_contents, | 25 void IsDistillablePageForDetector(content::WebContents* web_contents, |
| 21 const DistillablePageDetector* detector, | 26 const DistillablePageDetector* detector, |
| 22 base::Callback<void(bool)> callback); | 27 base::Callback<void(bool)> callback); |
| 23 } | 28 } |
| 24 | 29 |
| 25 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_ | 30 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_ |
| OLD | NEW |