Switch DomAutomationController to be a RenderFrameObserver.
BUG=304341
[email protected]
Review URL: https://codereview.chromium.org/157713002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252764 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c4a3f0c..98938c0 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -442,6 +442,8 @@
IPC_BEGIN_MESSAGE_MAP_EX(WebContentsImpl, message, message_is_ok)
IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse,
+ OnDomOperationResponse)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache,
OnDidLoadResourceFromMemoryCache)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent,
@@ -2391,6 +2393,15 @@
PluginCrashed(plugin_path, plugin_pid));
}
+void WebContentsImpl::OnDomOperationResponse(const std::string& json_string,
+ int automation_id) {
+ DomOperationNotificationDetails details(json_string, automation_id);
+ NotificationService::current()->Notify(
+ NOTIFICATION_DOM_OPERATION_RESPONSE,
+ Source<WebContents>(this),
+ Details<DomOperationNotificationDetails>(&details));
+}
+
void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url,
bool blocked_by_policy) {
// Notify observers about navigation.