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

Unified Diff: components/dom_distiller/content/dom_distiller_viewer_source.h

Issue 134873008: Add support for displaying distilled articles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added browser test for looking up articles, and fixed rebase of MIME-type Created 6 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/content/dom_distiller_viewer_source.h
diff --git a/components/dom_distiller/content/dom_distiller_viewer_source.h b/components/dom_distiller/content/dom_distiller_viewer_source.h
index ff08c4e38366d74705cb9848b0cec43c2820fd71..e2b168af6570ffc8f5bf5f140f323ce2e4ab235d 100644
--- a/components/dom_distiller/content/dom_distiller_viewer_source.h
+++ b/components/dom_distiller/content/dom_distiller_viewer_source.h
@@ -11,14 +11,16 @@
namespace dom_distiller {
+class DomDistillerService;
+
// Serves HTML and resources for viewing distilled articles.
class DomDistillerViewerSource : public content::URLDataSource {
public:
- DomDistillerViewerSource(const std::string& scheme);
-
- private:
+ DomDistillerViewerSource(DomDistillerService* dom_distiller_service,
+ const std::string& scheme);
virtual ~DomDistillerViewerSource();
+ private:
// Overridden from content::URLDataSource:
virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
@@ -27,12 +29,18 @@ class DomDistillerViewerSource : public content::URLDataSource {
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
- virtual bool ShouldServiceRequest(
- const net::URLRequest* request) const OVERRIDE;
+ virtual bool ShouldServiceRequest(const net::URLRequest* request)
+ const OVERRIDE;
+ virtual void WillServiceRequest(const net::URLRequest* request,
+ std::string* path) const OVERRIDE;
// The scheme this URLDataSource is hosted under.
std::string scheme_;
+ // The service which contains all the functionality needed to interact with
+ // the list of articles.
+ DomDistillerService* dom_distiller_service_;
+
DISALLOW_COPY_AND_ASSIGN(DomDistillerViewerSource);
};

Powered by Google App Engine
This is Rietveld 408576698