diff options
Diffstat (limited to 'chrome/renderer/extensions/user_script_slave.h')
-rw-r--r-- | chrome/renderer/extensions/user_script_slave.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/renderer/extensions/user_script_slave.h b/chrome/renderer/extensions/user_script_slave.h index 9e73be7..e92b40a 100644 --- a/chrome/renderer/extensions/user_script_slave.h +++ b/chrome/renderer/extensions/user_script_slave.h @@ -47,10 +47,15 @@ class UserScriptSlave { // Gets the isolated world ID to use for the given |extension| in the given // |frame|. If no isolated world has been created for that extension, // one will be created and initialized. - static int GetIsolatedWorldId(const Extension* extension, - WebKit::WebFrame* frame); + int GetIsolatedWorldIdForExtension(const Extension* extension, + WebKit::WebFrame* frame); - static void RemoveIsolatedWorld(const std::string& extension_id); + // Gets the id of the extension running in a given isolated world. If no such + // isolated world exists, or no extension is running in it, returns empty + // string. + std::string GetExtensionIdForIsolatedWorld(int isolated_world_id); + + void RemoveIsolatedWorld(const std::string& extension_id); static void InsertInitExtensionCode(std::vector<WebScriptSource>* sources, const std::string& extension_id); @@ -72,7 +77,7 @@ class UserScriptSlave { const ExtensionSet* extensions_; typedef std::map<std::string, int> IsolatedWorldMap; - static IsolatedWorldMap isolated_world_ids_; + IsolatedWorldMap isolated_world_ids_; DISALLOW_COPY_AND_ASSIGN(UserScriptSlave); }; |