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

Side by Side Diff: content/browser/tab_contents/interstitial_page.cc

Issue 7799009: Fix NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/popup_menu_helper_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tab_contents/interstitial_page.h" 5 #include "content/browser/tab_contents/interstitial_page.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // RenderViewHost before the resource request for the new page we are 274 // RenderViewHost before the resource request for the new page we are
275 // navigating arrives in the ResourceDispatcherHost. This ensures that 275 // navigating arrives in the ResourceDispatcherHost. This ensures that
276 // request won't be blocked if the same RenderViewHost was used for the 276 // request won't be blocked if the same RenderViewHost was used for the
277 // new navigation. 277 // new navigation.
278 Disable(); 278 Disable();
279 TakeActionOnResourceDispatcher(CANCEL); 279 TakeActionOnResourceDispatcher(CANCEL);
280 break; 280 break;
281 case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: 281 case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED:
282 if (action_taken_ == NO_ACTION) { 282 if (action_taken_ == NO_ACTION) {
283 // The RenderViewHost is being destroyed (as part of the tab being 283 // The RenderViewHost is being destroyed (as part of the tab being
284 // closed), make sure we clear the blocked requests. 284 // closed); make sure we clear the blocked requests.
285 RenderViewHost* rvh = Source<RenderViewHost>(source).ptr(); 285 RenderViewHost* rvh = static_cast<RenderViewHost*>(
286 Source<RenderWidgetHost>(source).ptr());
286 DCHECK(rvh->process()->id() == original_child_id_ && 287 DCHECK(rvh->process()->id() == original_child_id_ &&
287 rvh->routing_id() == original_rvh_id_); 288 rvh->routing_id() == original_rvh_id_);
288 TakeActionOnResourceDispatcher(CANCEL); 289 TakeActionOnResourceDispatcher(CANCEL);
289 } 290 }
290 break; 291 break;
291 case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: 292 case content::NOTIFICATION_TAB_CONTENTS_DESTROYED:
292 case content::NOTIFICATION_NAV_ENTRY_COMMITTED: 293 case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
293 if (action_taken_ == NO_ACTION) { 294 if (action_taken_ == NO_ACTION) {
294 // We are navigating away from the interstitial or closing a tab with an 295 // We are navigating away from the interstitial or closing a tab with an
295 // interstitial. Default to DontProceed(). We don't just call Hide as 296 // interstitial. Default to DontProceed(). We don't just call Hide as
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus( 661 void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus(
661 bool reverse) { 662 bool reverse) {
662 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate()) 663 if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())
663 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse); 664 interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse);
664 } 665 }
665 666
666 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( 667 void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply(
667 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 668 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
668 int active_match_ordinal, bool final_update) { 669 int active_match_ordinal, bool final_update) {
669 } 670 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/popup_menu_helper_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698