Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / dom_distiller / content / browser / distillable_page_utils.h
blobbcc6d4003cb90b49bdc9264ab367affb70be8b4e
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_
8 #include "base/callback.h"
9 #include "content/public/browser/web_contents.h"
11 namespace dom_distiller {
13 class DistillablePageDetector;
15 // Checks if the page appears to be distillable based on whichever heuristics
16 // are configured to be used (see dom_distiller::GetDistillerHeuristicsType).
17 void IsDistillablePage(content::WebContents* web_contents,
18 bool is_mobile_optimized,
19 base::Callback<void(bool)> callback);
21 // Checks if the web_contents is has opengraph type=article markup.
22 void IsOpenGraphArticle(content::WebContents* web_contents,
23 base::Callback<void(bool)> callback);
25 // Uses the provided DistillablePageDetector to detect if the page is
26 // distillable. The passed detector must be alive until after the callback is
27 // called.
28 void IsDistillablePageForDetector(content::WebContents* web_contents,
29 const DistillablePageDetector* detector,
30 base::Callback<void(bool)> callback);
33 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLABLE_PAGE_UTILS_H_