OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 | 1031 |
1032 void RenderViewHostImpl::OnMsgRunModal(int opener_id, IPC::Message* reply_msg) { | 1032 void RenderViewHostImpl::OnMsgRunModal(int opener_id, IPC::Message* reply_msg) { |
1033 DCHECK(!run_modal_reply_msg_); | 1033 DCHECK(!run_modal_reply_msg_); |
1034 run_modal_reply_msg_ = reply_msg; | 1034 run_modal_reply_msg_ = reply_msg; |
1035 run_modal_opener_id_ = opener_id; | 1035 run_modal_opener_id_ = opener_id; |
1036 | 1036 |
1037 content::RecordAction(UserMetricsAction("ShowModalDialog")); | 1037 content::RecordAction(UserMetricsAction("ShowModalDialog")); |
1038 | 1038 |
1039 RenderViewHostImpl* opener = | 1039 RenderViewHostImpl* opener = |
1040 RenderViewHostImpl::FromID(GetProcess()->GetID(), run_modal_opener_id_); | 1040 RenderViewHostImpl::FromID(GetProcess()->GetID(), run_modal_opener_id_); |
1041 opener->StopHangMonitorTimeout(); | 1041 if (opener) { |
1042 // The ack for the mouse down won't come until the dialog closes, so fake it | 1042 opener->StopHangMonitorTimeout(); |
1043 // so that we don't get a timeout. | 1043 // The ack for the mouse down won't come until the dialog closes, so fake it |
1044 opener->decrement_in_flight_event_count(); | 1044 // so that we don't get a timeout. |
| 1045 opener->decrement_in_flight_event_count(); |
| 1046 } |
1045 | 1047 |
1046 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in | 1048 // TODO(darin): Bug 1107929: Need to inform our delegate to show this view in |
1047 // an app-modal fashion. | 1049 // an app-modal fashion. |
1048 } | 1050 } |
1049 | 1051 |
1050 void RenderViewHostImpl::OnMsgRenderViewReady() { | 1052 void RenderViewHostImpl::OnMsgRenderViewReady() { |
1051 render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING; | 1053 render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING; |
1052 WasResized(); | 1054 WasResized(); |
1053 delegate_->RenderViewReady(this); | 1055 delegate_->RenderViewReady(this); |
1054 } | 1056 } |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 // can cause navigations to be ignored in OnMsgNavigate. | 1885 // can cause navigations to be ignored in OnMsgNavigate. |
1884 is_waiting_for_beforeunload_ack_ = false; | 1886 is_waiting_for_beforeunload_ack_ = false; |
1885 is_waiting_for_unload_ack_ = false; | 1887 is_waiting_for_unload_ack_ = false; |
1886 } | 1888 } |
1887 | 1889 |
1888 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1890 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1889 STLDeleteValues(&power_save_blockers_); | 1891 STLDeleteValues(&power_save_blockers_); |
1890 } | 1892 } |
1891 | 1893 |
1892 } // namespace content | 1894 } // namespace content |
OLD | NEW |