| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // The number of CSS scripts injected. | 33 // The number of CSS scripts injected. |
| 34 size_t num_css; | 34 size_t num_css; |
| 35 // The number of JS scripts injected. | 35 // The number of JS scripts injected. |
| 36 size_t num_js; | 36 size_t num_js; |
| 37 // The number of blocked JS scripts injected. | 37 // The number of blocked JS scripts injected. |
| 38 size_t num_blocking_js; | 38 size_t num_blocking_js; |
| 39 // A map of extension ids to executing script paths. | 39 // A map of extension ids to executing script paths. |
| 40 ExecutingScriptsMap executing_scripts; | 40 ExecutingScriptsMap executing_scripts; |
| 41 // The elapsed time since the ScriptsRunInfo was constructed. | 41 // The elapsed time since the ScriptsRunInfo was constructed. |
| 42 base::ElapsedTimer timer; | 42 base::ElapsedTimer timer; |
| 43 // A list of extension urls of executing scripts. | |
| 44 std::set<GURL> injected_scripts; | |
| 45 | 43 |
| 46 // Log information about a given script run. If |send_script_activity| is | 44 // Log information about a given script run. If |send_script_activity| is |
| 47 // true, this also informs the browser of the script run. | 45 // true, this also informs the browser of the script run. |
| 48 void LogRun(bool send_script_activity); | 46 void LogRun(bool send_script_activity); |
| 49 | 47 |
| 50 private: | 48 private: |
| 51 // The routinig id to use to notify the browser of any injections. Since the | 49 // The routinig id to use to notify the browser of any injections. Since the |
| 52 // frame may be deleted in injection, we don't hold on to a reference to it | 50 // frame may be deleted in injection, we don't hold on to a reference to it |
| 53 // directly. | 51 // directly. |
| 54 int routing_id_; | 52 int routing_id_; |
| 55 | 53 |
| 56 // The run location at which injection is happening. | 54 // The run location at which injection is happening. |
| 57 UserScript::RunLocation run_location_; | 55 UserScript::RunLocation run_location_; |
| 58 | 56 |
| 59 // The url of the frame, preserved for the same reason as the routing id. | 57 // The url of the frame, preserved for the same reason as the routing id. |
| 60 GURL frame_url_; | 58 GURL frame_url_; |
| 61 | 59 |
| 62 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo); | 60 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo); |
| 63 }; | 61 }; |
| 64 | 62 |
| 65 } // namespace extensions | 63 } // namespace extensions |
| 66 | 64 |
| 67 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ | 65 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ |
| OLD | NEW |