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

Side by Side Diff: components/dom_distiller/core/dom_distiller_service.h

Issue 396503003: DomDistiller: fix 0 document width (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CORE_DOM_DISTILLER_SERVICE_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Request to view an article by url. 76 // Request to view an article by url.
77 // Use CreateDefaultDistillerPage() to create a default |distiller_page|. 77 // Use CreateDefaultDistillerPage() to create a default |distiller_page|.
78 // The provided |distiller_page| is only used if there is not already a 78 // The provided |distiller_page| is only used if there is not already a
79 // distillation task in progress for the given |url|. 79 // distillation task in progress for the given |url|.
80 virtual scoped_ptr<ViewerHandle> ViewUrl( 80 virtual scoped_ptr<ViewerHandle> ViewUrl(
81 ViewRequestDelegate* delegate, 81 ViewRequestDelegate* delegate,
82 scoped_ptr<DistillerPage> distiller_page, 82 scoped_ptr<DistillerPage> distiller_page,
83 const GURL& url) = 0; 83 const GURL& url) = 0;
84 84
85 // Creates a default DistillerPage. 85 // Creates a default DistillerPage.
86 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() = 0; 86 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage(
87 const gfx::Size& render_view_size) = 0;
87 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( 88 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle(
88 scoped_ptr<SourcePageHandle> handle) = 0; 89 scoped_ptr<SourcePageHandle> handle) = 0;
89 90
90 virtual void AddObserver(DomDistillerObserver* observer) = 0; 91 virtual void AddObserver(DomDistillerObserver* observer) = 0;
91 virtual void RemoveObserver(DomDistillerObserver* observer) = 0; 92 virtual void RemoveObserver(DomDistillerObserver* observer) = 0;
92 93
93 protected: 94 protected:
94 DomDistillerServiceInterface() {} 95 DomDistillerServiceInterface() {}
95 96
96 private: 97 private:
(...skipping 18 matching lines...) Expand all
115 virtual scoped_ptr<ArticleEntry> RemoveEntry( 116 virtual scoped_ptr<ArticleEntry> RemoveEntry(
116 const std::string& entry_id) OVERRIDE; 117 const std::string& entry_id) OVERRIDE;
117 virtual scoped_ptr<ViewerHandle> ViewEntry( 118 virtual scoped_ptr<ViewerHandle> ViewEntry(
118 ViewRequestDelegate* delegate, 119 ViewRequestDelegate* delegate,
119 scoped_ptr<DistillerPage> distiller_page, 120 scoped_ptr<DistillerPage> distiller_page,
120 const std::string& entry_id) OVERRIDE; 121 const std::string& entry_id) OVERRIDE;
121 virtual scoped_ptr<ViewerHandle> ViewUrl( 122 virtual scoped_ptr<ViewerHandle> ViewUrl(
122 ViewRequestDelegate* delegate, 123 ViewRequestDelegate* delegate,
123 scoped_ptr<DistillerPage> distiller_page, 124 scoped_ptr<DistillerPage> distiller_page,
124 const GURL& url) OVERRIDE; 125 const GURL& url) OVERRIDE;
125 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() OVERRIDE; 126 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage(
127 const gfx::Size& render_view_size) OVERRIDE;
126 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( 128 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle(
127 scoped_ptr<SourcePageHandle> handle) OVERRIDE; 129 scoped_ptr<SourcePageHandle> handle) OVERRIDE;
128 virtual void AddObserver(DomDistillerObserver* observer) OVERRIDE; 130 virtual void AddObserver(DomDistillerObserver* observer) OVERRIDE;
129 virtual void RemoveObserver(DomDistillerObserver* observer) OVERRIDE; 131 virtual void RemoveObserver(DomDistillerObserver* observer) OVERRIDE;
130 132
131 private: 133 private:
132 void CancelTask(TaskTracker* task); 134 void CancelTask(TaskTracker* task);
133 void AddDistilledPageToList(const ArticleEntry& entry, 135 void AddDistilledPageToList(const ArticleEntry& entry,
134 const DistilledArticleProto* article_proto, 136 const DistilledArticleProto* article_proto,
135 bool distillation_succeeded); 137 bool distillation_succeeded);
(...skipping 15 matching lines...) Expand all
151 153
152 typedef ScopedVector<TaskTracker> TaskList; 154 typedef ScopedVector<TaskTracker> TaskList;
153 TaskList tasks_; 155 TaskList tasks_;
154 156
155 DISALLOW_COPY_AND_ASSIGN(DomDistillerService); 157 DISALLOW_COPY_AND_ASSIGN(DomDistillerService);
156 }; 158 };
157 159
158 } // namespace dom_distiller 160 } // namespace dom_distiller
159 161
160 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ 162 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698