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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 8505047: Fix panels being removed from PanelManager prematurely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Got rid of timeout by adding Details to notification from RenderViewHost. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 1160
1161 void RenderViewHost::OnMsgShouldCloseACK(bool proceed) { 1161 void RenderViewHost::OnMsgShouldCloseACK(bool proceed) {
1162 StopHangMonitorTimeout(); 1162 StopHangMonitorTimeout();
1163 // If this renderer navigated while the beforeunload request was in flight, we 1163 // If this renderer navigated while the beforeunload request was in flight, we
1164 // may have cleared this state in OnMsgNavigate, in which case we can ignore 1164 // may have cleared this state in OnMsgNavigate, in which case we can ignore
1165 // this message. 1165 // this message.
1166 if (!is_waiting_for_beforeunload_ack_ || is_swapped_out_) 1166 if (!is_waiting_for_beforeunload_ack_ || is_swapped_out_)
1167 return; 1167 return;
1168 1168
1169 is_waiting_for_beforeunload_ack_ = false; 1169 is_waiting_for_beforeunload_ack_ = false;
1170 content::NotificationService::current()->Notify(
1171 content::NOTIFICATION_RENDER_VIEW_HOST_RECEIVED_ON_MSG_SHOULD_CLOSE_ACK,
1172 content::Source<RenderViewHost>(this),
1173 content::Details<bool>(&proceed));
1170 1174
1171 RenderViewHostDelegate::RendererManagement* management_delegate = 1175 RenderViewHostDelegate::RendererManagement* management_delegate =
1172 delegate_->GetRendererManagementDelegate(); 1176 delegate_->GetRendererManagementDelegate();
1173 if (management_delegate) { 1177 if (management_delegate) {
1174 management_delegate->ShouldClosePage( 1178 management_delegate->ShouldClosePage(
1175 unload_ack_is_for_cross_site_transition_, proceed); 1179 unload_ack_is_for_cross_site_transition_, proceed);
1176 } 1180 }
1177 1181
1178 // If canceled, notify the delegate to cancel its pending navigation entry. 1182 // If canceled, notify the delegate to cancel its pending navigation entry.
1179 if (!proceed) 1183 if (!proceed)
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1502
1499 void RenderViewHost::OnWebUISend(const GURL& source_url, 1503 void RenderViewHost::OnWebUISend(const GURL& source_url,
1500 const std::string& name, 1504 const std::string& name,
1501 const base::ListValue& args) { 1505 const base::ListValue& args) {
1502 delegate_->WebUISend(this, source_url, name, args); 1506 delegate_->WebUISend(this, source_url, name, args);
1503 } 1507 }
1504 1508
1505 void RenderViewHost::ClearPowerSaveBlockers() { 1509 void RenderViewHost::ClearPowerSaveBlockers() {
1506 STLDeleteValues(&power_save_blockers_); 1510 STLDeleteValues(&power_save_blockers_);
1507 } 1511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698