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

Side by Side Diff: extensions/renderer/scripts_run_info.h

Issue 878513005: Extensions: suspend extension's scripts when V8 is paused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 5 #ifndef EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
6 #define EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 6 #define EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 // Map of extensions IDs to the executing script paths. 25 // Map of extensions IDs to the executing script paths.
26 typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap; 26 typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap;
27 27
28 ScriptsRunInfo(); 28 ScriptsRunInfo();
29 ~ScriptsRunInfo(); 29 ~ScriptsRunInfo();
30 30
31 // The number of CSS scripts injected. 31 // The number of CSS scripts injected.
32 size_t num_css; 32 size_t num_css;
33 // The number of JS scripts injected. 33 // The number of JS scripts injected.
34 size_t num_js; 34 size_t num_js;
35 // The number of blocked JS scripts injected.
36 size_t num_blocking_js;
35 // A map of extension ids to executing script paths. 37 // A map of extension ids to executing script paths.
36 ExecutingScriptsMap executing_scripts; 38 ExecutingScriptsMap executing_scripts;
37 // The elapsed time since the ScriptsRunInfo was constructed. 39 // The elapsed time since the ScriptsRunInfo was constructed.
38 base::ElapsedTimer timer; 40 base::ElapsedTimer timer;
39 41
40 // Log information about a given script run. 42 // Log information about a given script run.
41 void LogRun(blink::WebFrame* web_frame, UserScript::RunLocation location); 43 void LogRun(blink::WebFrame* web_frame, UserScript::RunLocation location);
42 44
43 private: 45 private:
44 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo); 46 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo);
45 }; 47 };
46 48
47 } // namespace extensions 49 } // namespace extensions
48 50
49 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 51 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698