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

Unified Diff: extensions/renderer/script_injection.h

Issue 922403002: [Extensions] Adjust script injection reporting to the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: extensions/renderer/script_injection.h
diff --git a/extensions/renderer/script_injection.h b/extensions/renderer/script_injection.h
index d7edd666165ec3d3ed1c21f12557287748c20899..e11e1e62dda7280a26aced3b6a2ef663f19aece9 100644
--- a/extensions/renderer/script_injection.h
+++ b/extensions/renderer/script_injection.h
@@ -55,8 +55,9 @@ class ScriptInjection {
int64 request_id() const { return request_id_; }
private:
- // Send a message to the browser requesting permission to execute.
- void RequestPermission();
+ // Sends a message to the browser, either that the script injection would
+ // like to inject, or to notify the browser that it is currently injecting.
+ void SendInjectionMessage(bool request_permission);
// Injects the script, optionally populating |scripts_run_info|.
void Inject(const Extension* extension, ScriptsRunInfo* scripts_run_info);
@@ -73,6 +74,9 @@ class ScriptInjection {
// Notify that we will not inject, and mark it as acknowledged.
void NotifyWillNotInject(ScriptInjector::InjectFailureReason reason);
+ // Notifies the browser of script injection, if appropriate.
+ void NotifyBrowserOfInjection(const Extension* extension);
+
// The injector for this injection.
scoped_ptr<ScriptInjector> injector_;

Powered by Google App Engine
This is Rietveld 408576698