Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/frameScript.js

Issue 29332902: Issue 3443 - Use process script instead of a frame script in Element Hiding Helper (Closed)
Patch Set: Addressed comments Created Dec. 21, 2015, 7:13 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/composer.js ('k') | chrome/content/processScript.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/frameScript.js
===================================================================
deleted file mode 100644
--- a/chrome/content/frameScript.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This Source Code is subject to the terms of the Mozilla Public License
- * version 2.0 (the "License"). You can obtain a copy of the License at
- * http://mozilla.org/MPL/2.0/.
- */
-
-(function()
-{
- const Cu = Components.utils;
-
- let rand = Components.stack.filename.replace(/.*\?/, "");
- let module = "chrome://elemhidehelper/content/actor.jsm?" + rand;
- let {shutdown, getNodeInfo, togglePreview, forgetNode} = Cu.import(module, {});
-
- addMessageListener("ElemHideHelper:Shutdown", onShutdown);
- addMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
- addMessageListener("ElemHideHelper:Preview", onTogglePreview);
-
- function onShutdown()
- {
- shutdown();
- try
- {
- Cu.unload(module);
- }
- catch (e)
- {
- Cu.reportError(e);
- }
-
- removeMessageListener("ElemHideHelper:Shutdown", onShutdown);
- removeMessageListener("ElemHideHelper:GetNodeInfo", onGetNodeInfo);
- removeMessageListener("ElemHideHelper:Preview", onTogglePreview);
- }
-
- function onGetNodeInfo(message)
- {
- let nodeInfo = getNodeInfo(message.objects.element);
- nodeInfo.messageId = message.data;
- sendAsyncMessage("ElemHideHelper:GetNodeInfo:Response", nodeInfo);
- }
-
- function onTogglePreview(message)
- {
- togglePreview(message.data.nodeID, message.data.stylesheetData);
- if (message.data.forgetNode)
- forgetNode(message.data.nodeID);
- }
-})();
« no previous file with comments | « chrome/content/composer.js ('k') | chrome/content/processScript.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld