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

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

Issue 178303004: Add incremental updates for multipage distillation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile by adding a header. Created 6 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_DISTILLATION_UPDATE_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_DISTILLATION_UPDATE_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "components/dom_distiller/core/proto/distilled_page.pb.h"
12
13 namespace dom_distiller {
14
15 // Update about an article that is currently under distillation.
16 class ArticleDistillationUpdate {
17 public:
18 typedef scoped_refptr<base::RefCountedData<DistilledPageProto> >
19 RefCountedDistilledPageProto;
20
21 ArticleDistillationUpdate(
22 const std::vector<RefCountedDistilledPageProto>& pages,
23 bool has_next_page,
24 bool has_prev_page);
25 ~ArticleDistillationUpdate();
26
27 const RefCountedDistilledPageProto getDistilledPage(size_t index) const;
cjhopman 2014/02/28 02:38:14 this should return a const& (not const value).
cjhopman 2014/02/28 02:38:14 s/get/Get
shashi 2014/03/02 02:53:40 This is a scoped_refptr<>, maybe I should rename i
shashi 2014/03/02 02:53:40 Done.
28
29 size_t getPagesSize() const;
cjhopman 2014/02/28 02:38:14 capitalize first letters of function names
shashi 2014/03/02 02:53:40 Done.
30
31 bool hasNextPage() const;
32
33 bool hasPrevPage() const;
34
35 private:
36 // True, if article has a next page.
37 bool has_next_page_;
38 // True, if article has a previous page.
39 bool has_prev_page_;
40 // Currently available pages.
41 std::vector<RefCountedDistilledPageProto> pages_;
42 };
43
44 } // namespace dom_distiller
45
46 #endif // COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_DISTILLATION_UPDATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698