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

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

Issue 597413003: Introduce an "ExtensionWantsToAct" method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 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 | « no previous file | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fe6f3cb4609025224a7427860bdb01fefed99b09..95133f27fa06e5cb7c7d0dfc63e9b9dc6d858ce5 100644
--- a/chrome/browser/extensions/active_script_controller.h
+++ b/chrome/browser/extensions/active_script_controller.h
@@ -19,6 +19,7 @@
#include "extensions/common/user_script.h"
namespace content {
+class BrowserContext;
class WebContents;
}
@@ -108,6 +109,10 @@ class ActiveScriptController : public content::WebContentsObserver,
// Grants permission for the given request to run.
void PermitScriptInjection(int64 request_id);
+ // Notifies the ExtensionActionAPI of a change (either that an extension now
+ // wants permission to run, or that it has been run).
+ void NotifyChange(const Extension* extension);
+
// Log metrics.
void LogUMA() const;
@@ -123,6 +128,9 @@ class ActiveScriptController : public content::WebContentsObserver,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) OVERRIDE;
+ // The associated browser context.
+ content::BrowserContext* browser_context_;
+
// Whether or not the ActiveScriptController is enabled (corresponding to the
// kActiveScriptEnforcement switch). If it is not, it acts as an empty shell,
// always allowing scripts to run and never displaying actions.
« no previous file with comments | « no previous file | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698