| Index: extensions/renderer/content_watcher.h
|
| diff --git a/extensions/renderer/content_watcher.h b/extensions/renderer/content_watcher.h
|
| index 3e3e79622f712a1eb0d01efdb461755f3f03db34..aafd736f6be42e5b8f5801e8be9cd1d90a6d3ead 100644
|
| --- a/extensions/renderer/content_watcher.h
|
| +++ b/extensions/renderer/content_watcher.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "extensions/common/watched_pages_recipient.h"
|
| #include "third_party/WebKit/public/platform/WebVector.h"
|
|
|
| namespace blink {
|
| @@ -31,10 +32,12 @@ class NativeHandler;
|
| // WebFrames can move between RenderViews through adoptNode.
|
| class ContentWatcher {
|
| public:
|
| - ContentWatcher();
|
| - ~ContentWatcher();
|
| + ContentWatcher(const std::string& event_name,
|
| + WatchedPagesRecipient watched_pages_recipient);
|
| + 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 +60,14 @@ 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_;
|
| +
|
| + // Indicator of where to send watched page updates (included in
|
| + // ExtensionMsg_WatchPages messages).
|
| + WatchedPagesRecipient watched_pages_recipient_;
|
| +
|
| // 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_;
|
|
|