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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 964583002: Remove showModalDialog (Chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index b5839aa2483aa1eb762220a4e028ff0e57f27db2..eca483c277fe20145787d6dab6b67aa00e632a02 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -193,8 +193,6 @@ RenderViewHostImpl::RenderViewHostImpl(
is_active_(!swapped_out),
is_swapped_out_(swapped_out),
main_frame_routing_id_(main_frame_routing_id),
- run_modal_reply_msg_(NULL),
- run_modal_opener_id_(MSG_ROUTING_NONE),
is_waiting_for_close_ack_(false),
render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING),
virtual_keyboard_requested_(false),
@@ -864,7 +862,6 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget)
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget,
OnShowFullscreenWidget)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnRunModal)
IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL)
@@ -898,34 +895,6 @@ void RenderViewHostImpl::Init() {
RenderWidgetHostImpl::Init();
}
-void RenderViewHostImpl::Shutdown() {
- // If we are being run modally (see RunModal), then we need to cleanup.
- if (run_modal_reply_msg_) {
- Send(run_modal_reply_msg_);
- run_modal_reply_msg_ = NULL;
- RenderViewHostImpl* opener =
- RenderViewHostImpl::FromID(GetProcess()->GetID(), run_modal_opener_id_);
- if (opener) {
- opener->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(
- hung_renderer_delay_ms_));
- // Balance out the decrement when we got created.
- opener->increment_in_flight_event_count();
- }
- run_modal_opener_id_ = MSG_ROUTING_NONE;
- }
-
- // We can't release the SessionStorageNamespace until our peer
jam 2015/02/26 21:40:36 why remove this code?
- // in the renderer has wound down.
- if (GetProcess()->HasConnection()) {
- RenderProcessHostImpl::ReleaseOnCloseACK(
- GetProcess(),
- delegate_->GetSessionStorageNamespaceMap(),
- GetRoutingID());
- }
-
- RenderWidgetHostImpl::Shutdown();
-}
-
void RenderViewHostImpl::WasHidden() {
if (ResourceDispatcherHostImpl::Get()) {
BrowserThread::PostTask(
@@ -1002,26 +971,6 @@ void RenderViewHostImpl::OnShowFullscreenWidget(int route_id) {
Send(new ViewMsg_Move_ACK(route_id));
}
-void RenderViewHostImpl::OnRunModal(int opener_id, IPC::Message* reply_msg) {
- DCHECK(!run_modal_reply_msg_);
- run_modal_reply_msg_ = reply_msg;
- run_modal_opener_id_ = opener_id;
-
- RecordAction(base::UserMetricsAction("ShowModalDialog"));
-
- RenderViewHostImpl* opener =
- RenderViewHostImpl::FromID(GetProcess()->GetID(), run_modal_opener_id_);
- if (opener) {
- opener->StopHangMonitorTimeout();
- // The ack for the mouse down won't come until the dialog closes, so fake it
- // so that we don't get a timeout.
- opener->decrement_in_flight_event_count();
- }
-
- // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in
- // an app-modal fashion.
-}
-
void RenderViewHostImpl::OnRenderViewReady() {
render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING;
SendScreenRects();

Powered by Google App Engine
This is Rietveld 408576698