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

Unified Diff: components/dom_distiller/core/dom_distiller_service.cc

Issue 1575473002: Improve syncing between dom distiller and the print preview request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: distilled_article_ready_ also removed, DidFinishLoad removed, DidNavigateMainFrame reinstated, adde… Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/core/dom_distiller_service.cc
diff --git a/components/dom_distiller/core/dom_distiller_service.cc b/components/dom_distiller/core/dom_distiller_service.cc
index 47d4f06d62986afcde2b3d376989f3a1380f3fc8..eeb177ef548705ddcbd1250110af944b5dc244ea 100644
--- a/components/dom_distiller/core/dom_distiller_service.cc
+++ b/components/dom_distiller/core/dom_distiller_service.cc
@@ -189,6 +189,16 @@ scoped_ptr<ViewerHandle> DomDistillerService::ViewUrl(
return viewer_handle;
}
+scoped_ptr<ViewerHandle> DomDistillerService::AddViewRequestDelegate(
+ ViewRequestDelegate* delegate,
+ const GURL& url) {
+ TaskTracker* task_tracker = GetTaskTrackerForUrl(url);
+ if (task_tracker)
+ return task_tracker->AddViewer(delegate);
+
+ return nullptr;
+}
+
bool DomDistillerService::GetOrCreateTaskTrackerForUrl(
const GURL& url,
TaskTracker** task_tracker) {

Powered by Google App Engine
This is Rietveld 408576698