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

Unified Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 157713002: Switch DomAutomationController to be a RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add notification to interstitialpageimpl Created 6 years, 10 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: content/browser/frame_host/interstitial_page_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 090ac124aa5d697f84d2cc40bc61a3f1e61f37b9..6a4ab44409b5256ee188d5c6430321b28d00022d 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -248,9 +248,6 @@ void InterstitialPageImpl::Show() {
notification_registrar_.Add(this, NOTIFICATION_NAV_ENTRY_PENDING,
Source<NavigationController>(controller_));
- notification_registrar_.Add(
- this, NOTIFICATION_DOM_OPERATION_RESPONSE,
- Source<RenderViewHost>(render_view_host_));
}
void InterstitialPageImpl::Hide() {
@@ -345,13 +342,6 @@ void InterstitialPageImpl::Observe(
TakeActionOnResourceDispatcher(CANCEL);
}
break;
- case NOTIFICATION_DOM_OPERATION_RESPONSE:
- if (enabled()) {
- Details<DomOperationNotificationDetails> dom_op_details(
- details);
- delegate_->CommandReceived(dom_op_details->json);
- }
- break;
default:
NOTREACHED();
}
@@ -374,6 +364,18 @@ void InterstitialPageImpl::RenderFrameCreated(
render_frame_host);
}
+void InterstitialPageImpl::OnDomOperationResponse(
+ const DomOperationNotificationDetails& details) {
+ // Needed by test code.
+ NotificationService::current()->Notify(
+ NOTIFICATION_DOM_OPERATION_RESPONSE,
+ Source<WebContents>(web_contents()),
+ Details<const DomOperationNotificationDetails>(&details));
+ if (!enabled())
+ return;
+ delegate_->CommandReceived(details.json);
+}
+
RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() {
return rvh_delegate_view_.get();
}

Powered by Google App Engine
This is Rietveld 408576698