| OLD | NEW |
| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 default: | 350 default: |
| 351 NOTREACHED(); | 351 NOTREACHED(); |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 void InterstitialPageImpl::NavigationEntryCommitted( | 355 void InterstitialPageImpl::NavigationEntryCommitted( |
| 356 const LoadCommittedDetails& load_details) { | 356 const LoadCommittedDetails& load_details) { |
| 357 OnNavigatingAwayOrTabClosing(); | 357 OnNavigatingAwayOrTabClosing(); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void InterstitialPageImpl::WebContentsWillBeDestroyed() { |
| 361 OnNavigatingAwayOrTabClosing(); |
| 362 } |
| 363 |
| 360 void InterstitialPageImpl::WebContentsDestroyed(WebContents* web_contents) { | 364 void InterstitialPageImpl::WebContentsDestroyed(WebContents* web_contents) { |
| 365 // WebContentsImpl will only call WebContentsWillBeDestroyed for interstitial |
| 366 // pages that it knows about, pages that called |
| 367 // WebContentsImpl::AttachInterstitialPage. But it's possible to have an |
| 368 // interstitial page that never progressed that far. In that case, ensure that |
| 369 // this interstitial page is destroyed. (And if it was attached, and |
| 370 // OnNavigatingAwayOrTabClosing was called, it's safe to call |
| 371 // OnNavigatingAwayOrTabClosing twice.) |
| 361 OnNavigatingAwayOrTabClosing(); | 372 OnNavigatingAwayOrTabClosing(); |
| 362 } | 373 } |
| 363 | 374 |
| 364 bool InterstitialPageImpl::OnMessageReceived(RenderFrameHost* render_frame_host, | 375 bool InterstitialPageImpl::OnMessageReceived(RenderFrameHost* render_frame_host, |
| 365 const IPC::Message& message) { | 376 const IPC::Message& message) { |
| 366 return OnMessageReceived(message); | 377 return OnMessageReceived(message); |
| 367 } | 378 } |
| 368 | 379 |
| 369 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host, | 380 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host, |
| 370 const IPC::Message& message) { | 381 const IPC::Message& message) { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 909 |
| 899 web_contents->GetDelegateView()->TakeFocus(reverse); | 910 web_contents->GetDelegateView()->TakeFocus(reverse); |
| 900 } | 911 } |
| 901 | 912 |
| 902 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 913 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
| 903 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 914 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 904 int active_match_ordinal, bool final_update) { | 915 int active_match_ordinal, bool final_update) { |
| 905 } | 916 } |
| 906 | 917 |
| 907 } // namespace content | 918 } // namespace content |
| OLD | NEW |