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

Side by Side Diff: components/dom_distiller/content/distiller_page_web_contents.h

Issue 1143173009: Add UMA histogram DomDistiller.Time.RunJavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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
« no previous file with comments | « no previous file | components/dom_distiller/content/distiller_page_web_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_ 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Creates a new WebContents, adds |this| as an observer, and loads the 93 // Creates a new WebContents, adds |this| as an observer, and loads the
94 // |url|. 94 // |url|.
95 virtual void CreateNewWebContents(const GURL& url); 95 virtual void CreateNewWebContents(const GURL& url);
96 96
97 // Injects and executes JavaScript in the context of a loaded page. This 97 // Injects and executes JavaScript in the context of a loaded page. This
98 // must only be called after the page has successfully loaded. 98 // must only be called after the page has successfully loaded.
99 void ExecuteJavaScript(); 99 void ExecuteJavaScript();
100 100
101 // Called when the distillation is done or if the page load failed. 101 // Called when the distillation is done or if the page load failed.
102 void OnWebContentsDistillationDone(const GURL& page_url, 102 void OnWebContentsDistillationDone(const GURL& page_url,
103 const base::TimeTicks& javascript_start,
103 const base::Value* value); 104 const base::Value* value);
104 105
105 // The current state of the |DistillerPage|, initially |IDLE|. 106 // The current state of the |DistillerPage|, initially |IDLE|.
106 State state_; 107 State state_;
107 108
108 // The JavaScript to inject to extract content. 109 // The JavaScript to inject to extract content.
109 std::string script_; 110 std::string script_;
110 111
111 scoped_ptr<SourcePageHandleWebContents> source_page_handle_; 112 scoped_ptr<SourcePageHandleWebContents> source_page_handle_;
112 113
113 content::BrowserContext* browser_context_; 114 content::BrowserContext* browser_context_;
114 gfx::Size render_view_size_; 115 gfx::Size render_view_size_;
115 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents); 116 DISALLOW_COPY_AND_ASSIGN(DistillerPageWebContents);
116 }; 117 };
117 118
118 } // namespace dom_distiller 119 } // namespace dom_distiller
119 120
120 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_ 121 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller/content/distiller_page_web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698