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

Side by Side Diff: chrome/browser/dom_distiller/lazy_dom_distiller_service.cc

Issue 266073003: Add support for distilling current WebContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 7 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 | Annotate | Revision Log
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 "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/dom_distiller/core/distiller_page.h"
10 #include "components/dom_distiller/core/dom_distiller_service.h" 11 #include "components/dom_distiller/core/dom_distiller_service.h"
11 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
12 13
13 namespace dom_distiller { 14 namespace dom_distiller {
14 15
15 LazyDomDistillerService::LazyDomDistillerService( 16 LazyDomDistillerService::LazyDomDistillerService(
16 Profile* profile, 17 Profile* profile,
17 const DomDistillerServiceFactory* service_factory) 18 const DomDistillerServiceFactory* service_factory)
18 : profile_(profile), service_factory_(service_factory) { 19 : profile_(profile), service_factory_(service_factory) {
19 registrar_.Add(this, 20 registrar_.Add(this,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 scoped_ptr<DistillerPage> distiller_page, 72 scoped_ptr<DistillerPage> distiller_page,
72 const GURL& url) { 73 const GURL& url) {
73 return instance()->ViewUrl(delegate, distiller_page.Pass(), url); 74 return instance()->ViewUrl(delegate, distiller_page.Pass(), url);
74 } 75 }
75 76
76 scoped_ptr<DistillerPage> 77 scoped_ptr<DistillerPage>
77 LazyDomDistillerService::CreateDefaultDistillerPage() { 78 LazyDomDistillerService::CreateDefaultDistillerPage() {
78 return instance()->CreateDefaultDistillerPage(); 79 return instance()->CreateDefaultDistillerPage();
79 } 80 }
80 81
82 scoped_ptr<DistillerPage>
83 LazyDomDistillerService::CreateDefaultDistillerPageWithHandle(
84 scoped_ptr<SourcePageHandle> handle) {
85 return instance()->CreateDefaultDistillerPageWithHandle(handle.Pass());
86 }
87
81 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) { 88 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) {
82 instance()->AddObserver(observer); 89 instance()->AddObserver(observer);
83 } 90 }
84 91
85 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) { 92 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) {
86 instance()->RemoveObserver(observer); 93 instance()->RemoveObserver(observer);
87 } 94 }
88 95
89 } // namespace dom_distiller 96 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/dom_distiller/lazy_dom_distiller_service.h ('k') | chrome/browser/dom_distiller/tab_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698