| OLD | NEW |
| 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_DISTILLER_PAGE_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "third_party/dom_distiller_js/dom_distiller.pb.h" | 14 #include "third_party/dom_distiller_js/dom_distiller.pb.h" |
| 15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace dom_distiller { | 18 namespace dom_distiller { |
| 19 | 19 |
| 20 struct DistilledPageInfo { | 20 struct DistilledPageInfo { |
| 21 struct MarkupArticle { |
| 22 std::string published_time; |
| 23 std::string modified_time; |
| 24 std::string expiration_time; |
| 25 std::string section; |
| 26 std::vector<std::string> authors; |
| 27 |
| 28 MarkupArticle(); |
| 29 ~MarkupArticle(); |
| 30 }; |
| 31 |
| 32 struct MarkupImage { |
| 33 std::string url; |
| 34 std::string secure_url; |
| 35 std::string type; |
| 36 std::string caption; |
| 37 int width; |
| 38 int height; |
| 39 |
| 40 MarkupImage(); |
| 41 ~MarkupImage(); |
| 42 }; |
| 43 |
| 44 struct MarkupInfo { |
| 45 std::string title; |
| 46 std::string type; |
| 47 std::string url; |
| 48 std::string description; |
| 49 std::string publisher; |
| 50 std::string copyright; |
| 51 std::string author; |
| 52 MarkupArticle article; |
| 53 std::vector<MarkupImage> images; |
| 54 |
| 55 MarkupInfo(); |
| 56 ~MarkupInfo(); |
| 57 }; |
| 58 |
| 21 std::string title; | 59 std::string title; |
| 22 std::string html; | 60 std::string html; |
| 23 std::string next_page_url; | 61 std::string next_page_url; |
| 24 std::string prev_page_url; | 62 std::string prev_page_url; |
| 25 std::vector<std::string> image_urls; | 63 std::vector<std::string> image_urls; |
| 64 MarkupInfo markup_info; |
| 65 |
| 26 DistilledPageInfo(); | 66 DistilledPageInfo(); |
| 27 ~DistilledPageInfo(); | 67 ~DistilledPageInfo(); |
| 28 | 68 |
| 29 private: | 69 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(DistilledPageInfo); | 70 DISALLOW_COPY_AND_ASSIGN(DistilledPageInfo); |
| 31 }; | 71 }; |
| 32 | 72 |
| 33 class SourcePageHandle { | 73 class SourcePageHandle { |
| 34 public: | 74 public: |
| 35 virtual ~SourcePageHandle() {} | 75 virtual ~SourcePageHandle() {} |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // used. | 124 // used. |
| 85 virtual scoped_ptr<DistillerPage> CreateDistillerPage( | 125 virtual scoped_ptr<DistillerPage> CreateDistillerPage( |
| 86 const gfx::Size& render_view_size) const = 0; | 126 const gfx::Size& render_view_size) const = 0; |
| 87 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( | 127 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( |
| 88 scoped_ptr<SourcePageHandle> handle) const = 0; | 128 scoped_ptr<SourcePageHandle> handle) const = 0; |
| 89 }; | 129 }; |
| 90 | 130 |
| 91 } // namespace dom_distiller | 131 } // namespace dom_distiller |
| 92 | 132 |
| 93 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ | 133 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ |
| OLD | NEW |