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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Removed what was added in https://codereview.chromium.org/239393009 Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 default: 349 default:
350 NOTREACHED(); 350 NOTREACHED();
351 } 351 }
352 } 352 }
353 353
354 void InterstitialPageImpl::NavigationEntryCommitted( 354 void InterstitialPageImpl::NavigationEntryCommitted(
355 const LoadCommittedDetails& load_details) { 355 const LoadCommittedDetails& load_details) {
356 OnNavigatingAwayOrTabClosing(); 356 OnNavigatingAwayOrTabClosing();
357 } 357 }
358 358
359 void InterstitialPageImpl::WebContentsWillBeDestroyed() { 359 void InterstitialPageImpl::WebContentsDestroyed() {
360 OnNavigatingAwayOrTabClosing(); 360 OnNavigatingAwayOrTabClosing();
361 } 361 }
362 362
363 void InterstitialPageImpl::WebContentsDestroyed(WebContents* web_contents) {
364 // WebContentsImpl will only call WebContentsWillBeDestroyed for interstitial
365 // pages that it knows about, pages that called
366 // WebContentsImpl::AttachInterstitialPage. But it's possible to have an
367 // interstitial page that never progressed that far. In that case, ensure that
368 // this interstitial page is destroyed. (And if it was attached, and
369 // OnNavigatingAwayOrTabClosing was called, it's safe to call
370 // OnNavigatingAwayOrTabClosing twice.)
371 OnNavigatingAwayOrTabClosing();
372 }
373
374 bool InterstitialPageImpl::OnMessageReceived(RenderFrameHost* render_frame_host, 363 bool InterstitialPageImpl::OnMessageReceived(RenderFrameHost* render_frame_host,
375 const IPC::Message& message) { 364 const IPC::Message& message) {
376 return OnMessageReceived(message); 365 return OnMessageReceived(message);
377 } 366 }
378 367
379 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host, 368 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host,
380 const IPC::Message& message) { 369 const IPC::Message& message) {
381 return OnMessageReceived(message); 370 return OnMessageReceived(message);
382 } 371 }
383 372
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 897
909 web_contents->GetDelegateView()->TakeFocus(reverse); 898 web_contents->GetDelegateView()->TakeFocus(reverse);
910 } 899 }
911 900
912 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 901 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
913 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 902 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
914 int active_match_ordinal, bool final_update) { 903 int active_match_ordinal, bool final_update) {
915 } 904 }
916 905
917 } // namespace content 906 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698