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 "url/gurl.h" | 16 #include "url/gurl.h" |
16 | 17 |
17 namespace dom_distiller { | 18 namespace dom_distiller { |
18 | 19 |
19 struct DistilledPageInfo { | 20 struct DistilledPageInfo { |
20 std::string title; | 21 std::string title; |
21 std::string html; | 22 std::string html; |
22 std::string next_page_url; | 23 std::string next_page_url; |
23 std::string prev_page_url; | 24 std::string prev_page_url; |
24 std::vector<std::string> image_urls; | 25 std::vector<std::string> image_urls; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 }; | 75 }; |
75 | 76 |
76 // Factory for generating a |DistillerPage|. | 77 // Factory for generating a |DistillerPage|. |
77 class DistillerPageFactory { | 78 class DistillerPageFactory { |
78 public: | 79 public: |
79 virtual ~DistillerPageFactory(); | 80 virtual ~DistillerPageFactory(); |
80 | 81 |
81 // Constructs and returns a new DistillerPage. The implementation of this | 82 // Constructs and returns a new DistillerPage. The implementation of this |
82 // should be very cheap, since the pages can be thrown away without being | 83 // should be very cheap, since the pages can be thrown away without being |
83 // used. | 84 // used. |
84 virtual scoped_ptr<DistillerPage> CreateDistillerPage() const = 0; | 85 virtual scoped_ptr<DistillerPage> CreateDistillerPage( |
| 86 const gfx::Size& render_view_size) const = 0; |
85 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( | 87 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( |
86 scoped_ptr<SourcePageHandle> handle) const = 0; | 88 scoped_ptr<SourcePageHandle> handle) const = 0; |
87 }; | 89 }; |
88 | 90 |
89 } // namespace dom_distiller | 91 } // namespace dom_distiller |
90 | 92 |
91 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ | 93 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ |
OLD | NEW |