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

Unified Diff: extensions/renderer/user_script_injector.h

Issue 2213603002: Prevent duplicate content script injection defined in manifest.json (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed lgtm nits Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/scripts_run_info.h ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_injector.h
diff --git a/extensions/renderer/user_script_injector.h b/extensions/renderer/user_script_injector.h
index cb89271d91fa5b06e81588b9b9907551bb1461d6..a6d6731c6c78b18980f7b8ca1104def7237bf7d1 100644
--- a/extensions/renderer/user_script_injector.h
+++ b/extensions/renderer/user_script_injector.h
@@ -41,18 +41,24 @@ class UserScriptInjector : public ScriptInjector,
bool ShouldExecuteInMainWorld() const override;
bool IsUserGesture() const override;
bool ExpectsResults() const override;
- bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
- bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
+ bool ShouldInjectJs(
+ UserScript::RunLocation run_location,
+ const std::set<std::string>& executing_scripts) const override;
+ bool ShouldInjectCss(
+ UserScript::RunLocation run_location,
+ const std::set<std::string>& injected_stylesheets) const override;
PermissionsData::AccessType CanExecuteOnFrame(
const InjectionHost* injection_host,
blink::WebLocalFrame* web_frame,
int tab_id) const override;
std::vector<blink::WebScriptSource> GetJsSources(
- UserScript::RunLocation run_location) const override;
+ UserScript::RunLocation run_location,
+ std::set<std::string>* executing_scripts,
+ size_t* num_injected_js_scripts) const override;
std::vector<blink::WebString> GetCssSources(
- UserScript::RunLocation run_location) const override;
- void GetRunInfo(ScriptsRunInfo* scripts_run_info,
- UserScript::RunLocation run_location) const override;
+ UserScript::RunLocation run_location,
+ std::set<std::string>* injected_stylesheets,
+ size_t* num_injected_stylesheets) const override;
void OnInjectionComplete(std::unique_ptr<base::Value> execution_result,
UserScript::RunLocation run_location,
content::RenderFrame* render_frame) override;
« no previous file with comments | « extensions/renderer/scripts_run_info.h ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698