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

Unified Diff: chrome/renderer/resources/extensions/content_watcher.js

Issue 22903023: Simplify ContentWatcher by calling querySelector directly instead of through JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « chrome/renderer/extensions/content_watcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/content_watcher.js
diff --git a/chrome/renderer/resources/extensions/content_watcher.js b/chrome/renderer/resources/extensions/content_watcher.js
index 9c118ed9425a8ffc9569420b222972fc65950b21..e34317710613ee7a2bd3c8124591e0247100577f 100644
--- a/chrome/renderer/resources/extensions/content_watcher.js
+++ b/chrome/renderer/resources/extensions/content_watcher.js
@@ -4,21 +4,6 @@
var contentWatcherNative = requireNative("contentWatcherNative");
-// Returns the indices in |cssSelectors| that match any element on the page.
-exports.FindMatchingSelectors = function(cssSelectors) {
- var result = []
- $Array.forEach(cssSelectors, function(selector, index) {
- try {
- if (document.querySelector(selector) != null)
- $Array.push(result, index);
- } catch (exception) {
- throw new Error("query Selector failed on '" + selector + "': " +
- exception.stack);
- }
- });
- return result;
-};
-
// Watches the page for all changes and calls FrameMutated (a C++ callback) in
// response.
var mutation_observer = new MutationObserver(contentWatcherNative.FrameMutated);
« no previous file with comments | « chrome/renderer/extensions/content_watcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698