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" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 // either a dictionary with all the content, or a stringified version. | 59 // either a dictionary with all the content, or a stringified version. |
60 virtual bool StringifyOutput() = 0; | 60 virtual bool StringifyOutput() = 0; |
61 | 61 |
62 // If true, forces the creation of a new window context to evaluate the | 62 // If true, forces the creation of a new window context to evaluate the |
63 // JavaScript. | 63 // JavaScript. |
64 virtual bool CreateNewContext() = 0; | 64 virtual bool CreateNewContext() = 0; |
65 | 65 |
66 private: | 66 private: |
67 bool ready_; | 67 bool ready_; |
68 DistillerPageCallback distiller_page_callback_; | 68 DistillerPageCallback distiller_page_callback_; |
69 base::TimeTicks distillation_start; | |
cjhopman
2015/05/08 01:31:40
nit: should end with an underscore
| |
69 DISALLOW_COPY_AND_ASSIGN(DistillerPage); | 70 DISALLOW_COPY_AND_ASSIGN(DistillerPage); |
70 }; | 71 }; |
71 | 72 |
72 // Factory for generating a |DistillerPage|. | 73 // Factory for generating a |DistillerPage|. |
73 class DistillerPageFactory { | 74 class DistillerPageFactory { |
74 public: | 75 public: |
75 virtual ~DistillerPageFactory(); | 76 virtual ~DistillerPageFactory(); |
76 | 77 |
77 // Constructs and returns a new DistillerPage. The implementation of this | 78 // Constructs and returns a new DistillerPage. The implementation of this |
78 // should be very cheap, since the pages can be thrown away without being | 79 // should be very cheap, since the pages can be thrown away without being |
79 // used. | 80 // used. |
80 virtual scoped_ptr<DistillerPage> CreateDistillerPage( | 81 virtual scoped_ptr<DistillerPage> CreateDistillerPage( |
81 const gfx::Size& render_view_size) const = 0; | 82 const gfx::Size& render_view_size) const = 0; |
82 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( | 83 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle( |
83 scoped_ptr<SourcePageHandle> handle) const = 0; | 84 scoped_ptr<SourcePageHandle> handle) const = 0; |
84 }; | 85 }; |
85 | 86 |
86 } // namespace dom_distiller | 87 } // namespace dom_distiller |
87 | 88 |
88 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ | 89 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_ |
OLD | NEW |