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

Side by Side Diff: chrome/browser/dom_distiller/lazy_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/dom_distiller/lazy_dom_distiller_service.h" 5 #include "chrome/browser/dom_distiller/lazy_dom_distiller_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 10 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return instance()->ViewEntry(delegate, std::move(distiller_page), entry_id); 79 return instance()->ViewEntry(delegate, std::move(distiller_page), entry_id);
80 } 80 }
81 81
82 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl( 82 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl(
83 ViewRequestDelegate* delegate, 83 ViewRequestDelegate* delegate,
84 scoped_ptr<DistillerPage> distiller_page, 84 scoped_ptr<DistillerPage> distiller_page,
85 const GURL& url) { 85 const GURL& url) {
86 return instance()->ViewUrl(delegate, std::move(distiller_page), url); 86 return instance()->ViewUrl(delegate, std::move(distiller_page), url);
87 } 87 }
88 88
89 scoped_ptr<ViewerHandle> LazyDomDistillerService::AddViewRequestDelegate(
90 ViewRequestDelegate* delegate,
91 const GURL& url) {
92 return instance()->AddViewRequestDelegate(delegate, url);
93 }
94
89 scoped_ptr<DistillerPage> 95 scoped_ptr<DistillerPage>
90 LazyDomDistillerService::CreateDefaultDistillerPage( 96 LazyDomDistillerService::CreateDefaultDistillerPage(
91 const gfx::Size& render_view_size) { 97 const gfx::Size& render_view_size) {
92 return instance()->CreateDefaultDistillerPage(render_view_size); 98 return instance()->CreateDefaultDistillerPage(render_view_size);
93 } 99 }
94 100
95 scoped_ptr<DistillerPage> 101 scoped_ptr<DistillerPage>
96 LazyDomDistillerService::CreateDefaultDistillerPageWithHandle( 102 LazyDomDistillerService::CreateDefaultDistillerPageWithHandle(
97 scoped_ptr<SourcePageHandle> handle) { 103 scoped_ptr<SourcePageHandle> handle) {
98 return instance()->CreateDefaultDistillerPageWithHandle(std::move(handle)); 104 return instance()->CreateDefaultDistillerPageWithHandle(std::move(handle));
99 } 105 }
100 106
101 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) { 107 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) {
102 instance()->AddObserver(observer); 108 instance()->AddObserver(observer);
103 } 109 }
104 110
105 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) { 111 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) {
106 instance()->RemoveObserver(observer); 112 instance()->RemoveObserver(observer);
107 } 113 }
108 114
109 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() { 115 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() {
110 return instance()->GetDistilledPagePrefs(); 116 return instance()->GetDistilledPagePrefs();
111 } 117 }
112 118
113 } // namespace dom_distiller 119 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698