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

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

Issue 1130703003: Show template before distiller finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-superclass
Patch Set: Fix flaky test Created 5 years, 6 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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 class DistillerViewer : public DomDistillerRequestViewBase { 27 class DistillerViewer : public DomDistillerRequestViewBase {
28 public: 28 public:
29 typedef base::Callback<void(const GURL&, const std::string&)> 29 typedef base::Callback<void(const GURL&, const std::string&)>
30 DistillationFinishedCallback; 30 DistillationFinishedCallback;
31 31
32 DistillerViewer(ios::ChromeBrowserState* browser_state, 32 DistillerViewer(ios::ChromeBrowserState* browser_state,
33 const GURL& url, 33 const GURL& url,
34 const DistillationFinishedCallback& callback); 34 const DistillationFinishedCallback& callback);
35 ~DistillerViewer() override; 35 ~DistillerViewer() override;
36 36
37 void OnArticleReady(
38 const dom_distiller::DistilledArticleProto* article_proto) override;
39
37 void SendJavaScript(const std::string& buffer) override; 40 void SendJavaScript(const std::string& buffer) override;
38 41
39 std::string GetJavaScriptBuffer();
40
41 private: 42 private:
42 // The url of the distilled page. 43 // The url of the distilled page.
43 const GURL url_; 44 const GURL url_;
44 // Interface for accessing preferences for distilled pages.
45 scoped_ptr<DistilledPagePrefs> distilled_page_prefs_;
46 // JavaScript buffer. 45 // JavaScript buffer.
47 std::string js_buffer_; 46 std::string js_buffer_;
47 // Callback to run once distillation is complete.
48 const DistillationFinishedCallback callback_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(DistillerViewer); 50 DISALLOW_COPY_AND_ASSIGN(DistillerViewer);
50 }; 51 };
51 52
52 } // namespace dom_distiller 53 } // namespace dom_distiller
53 54
54 #endif // IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_ 55 #endif // IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
OLDNEW
« no previous file with comments | « components/dom_distiller_strings.grdp ('k') | ios/chrome/browser/dom_distiller/distiller_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698