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

Unified Diff: extensions/renderer/content_watcher.h

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up declarative_content.json and store RequestContentScript data in action object 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
Index: extensions/renderer/content_watcher.h
diff --git a/extensions/renderer/content_watcher.h b/extensions/renderer/content_watcher.h
index 3e3e79622f712a1eb0d01efdb461755f3f03db34..9fe92efdcec43d0abab649b1e938a8da9033bb12 100644
--- a/extensions/renderer/content_watcher.h
+++ b/extensions/renderer/content_watcher.h
@@ -31,10 +31,11 @@ class NativeHandler;
// WebFrames can move between RenderViews through adoptNode.
class ContentWatcher {
public:
- ContentWatcher();
- ~ContentWatcher();
+ ContentWatcher(const std::string& event_name);
Jeffrey Yasskin 2014/07/15 17:13:00 I don't think we want 3 different ContentWatchers
Mark Dittmer 2014/07/15 18:32:43 Acknowledged. I'll fix this once I've merged to a
+ virtual ~ContentWatcher();
- // Handler for ExtensionMsg_WatchPages.
+ // Indirect handler for ExtensionMsg_WatchPages (mediated by
+ // Dispatcher::OnWatchPages).
void OnWatchPages(const std::vector<std::string>& css_selectors);
// Uses WebDocument::watchCSSSelectors to watch the selectors in
@@ -57,6 +58,10 @@ class ContentWatcher {
// frames that it could run on.
void NotifyBrowserOfChange(blink::WebFrame* changed_frame) const;
+ // Event name associated with the browser-side component that corresponds to
+ // this content watcher (included in ExtensionMsg_WatchPages messages).
+ std::string event_name_;
+
// If any of these selectors match on a page, we need to send an
// ExtensionHostMsg_OnWatchedPageChange back to the browser.
blink::WebVector<blink::WebString> css_selectors_;

Powered by Google App Engine
This is Rietveld 408576698