Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: components/dom_distiller/content/distillable_page_utils.h

Issue 1051673002: Add flags and experiment config for selecting triggering heuristics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dd-heuristics-apply
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // 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 base::Callback<void(bool)> callback);
19
20 // Checks if the web_contents is has opengraph type=article markup.
15 void IsOpenGraphArticle(content::WebContents* web_contents, 21 void IsOpenGraphArticle(content::WebContents* web_contents,
16 base::Callback<void(bool)> callback); 22 base::Callback<void(bool)> callback);
17 void IsDistillablePage(content::WebContents* web_contents, 23
18 base::Callback<void(bool)> callback); 24 // Uses the provided DistillablePageDetector to detect if the page is
19 // The passed detector must be alive until after the callback is called. 25 // distillable. The passed detector must be alive until after the callback is
26 // called.
20 void IsDistillablePageForDetector(content::WebContents* web_contents, 27 void IsDistillablePageForDetector(content::WebContents* web_contents,
21 const DistillablePageDetector* detector, 28 const DistillablePageDetector* detector,
22 base::Callback<void(bool)> callback); 29 base::Callback<void(bool)> callback);
23 } 30 }
24 31
25 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_ 32 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLABLE_PAGE_UTILS_H_
OLDNEW
« no previous file with comments | « components/dom_distiller.gypi ('k') | components/dom_distiller/content/distillable_page_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698