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

Unified Diff: extensions/renderer/user_script_slave.cc

Issue 293003008: Make ActiveScriptController use Active Tab-style permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ 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
« no previous file with comments | « extensions/common/permissions/permissions_data_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_script_slave.cc
diff --git a/extensions/renderer/user_script_slave.cc b/extensions/renderer/user_script_slave.cc
index 036581b3cd5502a929b4014cf0517353a3c8c8dc..eda1c0e28bf94552436ad5d9b9bdc68bd7fcf632 100644
--- a/extensions/renderer/user_script_slave.cc
+++ b/extensions/renderer/user_script_slave.cc
@@ -18,6 +18,7 @@
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest_handlers/csp_info.h"
#include "extensions/common/permissions/permissions_data.h"
+#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/extensions_renderer_client.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@@ -183,7 +184,10 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
const Extension* extension = GetExtension(injection->extension_id());
DCHECK(extension);
- if (PermissionsData::RequiresActionForScriptExecution(extension)) {
+ if (PermissionsData::RequiresActionForScriptExecution(
+ extension,
+ ExtensionHelper::Get(top_render_view)->tab_id(),
+ document_url)) {
// TODO(rdevlin.cronin): Right now, this is just a notification, but soon
// we should block without user consent.
top_render_view->Send(
« no previous file with comments | « extensions/common/permissions/permissions_data_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698