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

Unified Diff: background.js

Issue 6393086494113792: Issue 154 - Added devtools panel showing blocked and blockable items (Closed)
Patch Set: Rebased Created Feb. 13, 2015, 4:16 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 | « no previous file | chrome/devtools.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -47,6 +47,11 @@
this.startIconAnimation = startIconAnimation;
this.stopIconAnimation = stopIconAnimation;
}
+with(require("devtools"))
+{
+ this.hasDevToolsPanel = hasDevToolsPanel;
+ this.logHiddenElements = logHiddenElements;
+}
var FilterStorage = require("filterStorage").FilterStorage;
var ElemHide = require("elemHide").ElemHide;
var defaultMatcher = require("matcher").defaultMatcher;
@@ -491,7 +496,7 @@
}
}
- sendResponse(selectors);
+ sendResponse({selectors: selectors, trace: hasDevToolsPanel(sender.page)});
break;
case "should-collapse":
if (isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT"))
@@ -556,6 +561,9 @@
htmlPages.set(sender.page, null);
refreshIconAndContextMenu(sender.page);
break;
+ case "trace-elemhide":
+ logHiddenElements(sender.page, msg.selectors, extractHostFromFrame(sender.frame));
+ break;
case "forward":
if (sender.page)
{
« no previous file with comments | « no previous file | chrome/devtools.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld