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

Unified Diff: extensions/renderer/script_injector.h

Issue 348313003: Create withheld permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master Created 6 years, 5 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/renderer/script_injection.cc ('k') | extensions/renderer/user_script_injector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injector.h
diff --git a/extensions/renderer/script_injector.h b/extensions/renderer/script_injector.h
index 3bb0651c0ffb4380f96b13c5e66832a44f244a8f..9b4aca96b9d479b39652b54aa21de60d538f9629 100644
--- a/extensions/renderer/script_injector.h
+++ b/extensions/renderer/script_injector.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "extensions/common/user_script.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
@@ -34,16 +35,11 @@ class ScriptInjector {
// (or just did not accept) the injection.
};
- // The possible types of access for a given frame.
- enum AccessType {
- DENY_ACCESS, // The script cannot access the given frame.
- ALLOW_ACCESS, // The script can access the given frame.
- REQUEST_ACCESS // The browser must determine if the script can access the
- // given frame.
- };
-
virtual ~ScriptInjector() {}
+ // Returns the script type of this particular injection.
+ virtual UserScript::InjectionType script_type() const = 0;
+
// Returns true if the script should execute in child frames.
virtual bool ShouldExecuteInChildFrames() const = 0;
@@ -64,10 +60,11 @@ class ScriptInjector {
virtual bool ShouldInjectCss(UserScript::RunLocation run_location) const = 0;
// Returns true if the script should execute on the given |frame|.
- virtual AccessType CanExecuteOnFrame(const Extension* extension,
- blink::WebFrame* web_frame,
- int tab_id,
- const GURL& top_url) const = 0;
+ virtual PermissionsData::AccessType CanExecuteOnFrame(
+ const Extension* extension,
+ blink::WebFrame* web_frame,
+ int tab_id,
+ const GURL& top_url) const = 0;
// Returns the javascript sources to inject at the given |run_location|.
// Only called if ShouldInjectJs() is true.
« no previous file with comments | « extensions/renderer/script_injection.cc ('k') | extensions/renderer/user_script_injector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698