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

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

Issue 1131493005: Add UMA histogram DomDistiller.Time.DistillPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix naming Created 5 years, 7 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 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
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_;
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_
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller/core/distiller_page.cc » ('j') | components/dom_distiller/core/distiller_page.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698