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

Side by Side Diff: ios/chrome/browser/dom_distiller/distiller_viewer.h

Issue 2604773002: Create distiller files for Reading List. (Closed)
Patch Set: Created 3 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_ 5 #ifndef IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
6 #define IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_ 6 #define IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 DISALLOW_COPY_AND_ASSIGN(DistillerViewerInterface); 48 DISALLOW_COPY_AND_ASSIGN(DistillerViewerInterface);
49 }; 49 };
50 50
51 // A very simple and naive implementation of the DistillerViewer. 51 // A very simple and naive implementation of the DistillerViewer.
52 class DistillerViewer : public DistillerViewerInterface { 52 class DistillerViewer : public DistillerViewerInterface {
53 public: 53 public:
54 DistillerViewer(dom_distiller::DomDistillerService* distillerService, 54 DistillerViewer(dom_distiller::DomDistillerService* distillerService,
55 PrefService* prefs, 55 PrefService* prefs,
56 const GURL& url, 56 const GURL& url,
57 const DistillationFinishedCallback& callback); 57 const DistillationFinishedCallback& callback,
58 const DistillerPageFactory* factory);
gambard 2016/12/27 09:35:58 Update comment
Olivier 2016/12/27 10:08:36 there is no comment :s
58 ~DistillerViewer() override; 59 ~DistillerViewer() override;
59 60
60 void OnArticleReady( 61 void OnArticleReady(
61 const dom_distiller::DistilledArticleProto* article_proto) override; 62 const dom_distiller::DistilledArticleProto* article_proto) override;
62 63
63 void SendJavaScript(const std::string& buffer) override; 64 void SendJavaScript(const std::string& buffer) override;
64 65
65 private: 66 private:
66 // The url of the distilled page. 67 // The url of the distilled page.
67 const GURL url_; 68 const GURL url_;
68 // JavaScript buffer. 69 // JavaScript buffer.
69 std::string js_buffer_; 70 std::string js_buffer_;
70 // Callback to run once distillation is complete. 71 // Callback to run once distillation is complete.
71 const DistillationFinishedCallback callback_; 72 const DistillationFinishedCallback callback_;
72 73
73 DISALLOW_COPY_AND_ASSIGN(DistillerViewer); 74 DISALLOW_COPY_AND_ASSIGN(DistillerViewer);
74 }; 75 };
75 76
76 } // namespace dom_distiller 77 } // namespace dom_distiller
77 78
78 #endif // IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_ 79 #endif // IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698