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

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: Created 4 years, 11 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..bf0a680a0b0e9343b93c1b05af3b3fcc3eb3c181 100644
--- a/components/dom_distiller/core/dom_distiller_service.cc
+++ b/components/dom_distiller/core/dom_distiller_service.cc
@@ -189,6 +189,15 @@ scoped_ptr<ViewerHandle> DomDistillerService::ViewUrl(
return viewer_handle;
}
+scoped_ptr<ViewerHandle> DomDistillerService::AddViewRequestDelegate(
+ ViewRequestDelegate* delegate,
+ const GURL& url) {
+ TaskTracker* task_tracker = nullptr;
+ GetOrCreateTaskTrackerForUrl(url, &task_tracker);
+ scoped_ptr<ViewerHandle> viewer_handle = task_tracker->AddViewer(delegate);
Bernhard Bauer 2016/01/19 17:21:02 You can just directly return this.
mvendramini_hp 2016/01/20 11:56:57 Done.
+ return viewer_handle;
+}
+
bool DomDistillerService::GetOrCreateTaskTrackerForUrl(
const GURL& url,
TaskTracker** task_tracker) {

Powered by Google App Engine
This is Rietveld 408576698