summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 08:40:49 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 08:40:49 +0000
commitd725947e8a370c790794a66fd36d349b7b33b8b8 (patch)
treea4e71071b7efee3341da93b451989b95ba8f8920 /chrome/renderer/resources
parentc83658c33bdf286c7d4cf8f766616e297624daec (diff)
downloadchromium_src-d725947e8a370c790794a66fd36d349b7b33b8b8.zip
chromium_src-d725947e8a370c790794a66fd36d349b7b33b8b8.tar.gz
chromium_src-d725947e8a370c790794a66fd36d349b7b33b8b8.tar.bz2
Enforce extension permissions in C++ (instead of Javascript).
BUG=38920 TEST=ExtensionApiTest.Incognito Review URL: http://codereview.chromium.org/1148009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r--chrome/renderer/resources/event_bindings.js10
-rw-r--r--chrome/renderer/resources/extension_process_bindings.js5
2 files changed, 1 insertions, 14 deletions
diff --git a/chrome/renderer/resources/event_bindings.js b/chrome/renderer/resources/event_bindings.js
index 7ea6bbf..aaea01c 100644
--- a/chrome/renderer/resources/event_bindings.js
+++ b/chrome/renderer/resources/event_bindings.js
@@ -45,20 +45,12 @@ var chrome = chrome || {};
// An array of all attached event objects, used for detaching on unload.
var allAttachedEvents = [];
- // By default (for content scripts), this function returns false. Extension
- // contexts override this to do the right thing.
- chromeHidden.canAccessIncognito = function() {
- return false;
- }
-
chromeHidden.Event = {};
// Dispatches a named event with the given JSON array, which is deserialized
// before dispatch. The JSON array is the list of arguments that will be
// sent with the event callback.
- chromeHidden.Event.dispatchJSON = function(name, args, hasIncognitoData) {
- if (hasIncognitoData && !chromeHidden.canAccessIncognito())
- return;
+ chromeHidden.Event.dispatchJSON = function(name, args) {
if (attachedNamedEvents[name]) {
if (args) {
args = JSON.parse(args);
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js
index 7e803b5..5d80919 100644
--- a/chrome/renderer/resources/extension_process_bindings.js
+++ b/chrome/renderer/resources/extension_process_bindings.js
@@ -18,17 +18,12 @@ var chrome = chrome || {};
native function GetPopupParentWindow();
native function GetPopupView();
native function SetExtensionActionIcon();
- native function CanAccessIncognito();
if (!chrome)
chrome = {};
var chromeHidden = GetChromeHidden();
- chromeHidden.canAccessIncognito = function() {
- return CanAccessIncognito();
- }
-
// Validate arguments.
chromeHidden.validationTypes = [];
chromeHidden.validate = function(args, schemas) {