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

Unified Diff: chrome/browser/extensions/active_script_controller.h

Issue 288053002: Block content scripts from executing until user grants permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CQ Time! Created 6 years, 7 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: chrome/browser/extensions/active_script_controller.h
diff --git a/chrome/browser/extensions/active_script_controller.h b/chrome/browser/extensions/active_script_controller.h
index f7b20888b0338840c819e3b0d76dddfa721894c4..457e5800e1ec1e50f1e6e3f8cb1626bdebc4cc53 100644
--- a/chrome/browser/extensions/active_script_controller.h
+++ b/chrome/browser/extensions/active_script_controller.h
@@ -62,7 +62,7 @@ class ActiveScriptController : public LocationBarController::ActionProvider,
void OnActiveTabPermissionGranted(const Extension* extension);
// Notifies the ActiveScriptController of detected ad injection.
- void OnAdInjectionDetected(const std::set<std::string> ad_injectors);
+ void OnAdInjectionDetected(const std::set<std::string>& ad_injectors);
// LocationBarControllerProvider implementation.
virtual ExtensionAction* GetActionForExtension(
@@ -88,9 +88,13 @@ class ActiveScriptController : public LocationBarController::ActionProvider,
// Runs any pending injections for the corresponding extension.
void RunPendingForExtension(const Extension* extension);
- // Handles the NotifyExtensionScriptExecution message.
- void OnNotifyExtensionScriptExecution(const std::string& extension_id,
- int page_id);
+ // Handle the RequestContentScriptPermission message.
+ void OnRequestContentScriptPermission(const std::string& extension_id,
+ int page_id,
+ int request_id);
+
+ // Grants permission for the given request to run.
+ void GrantContentScriptPermission(int request_id);
// content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698