| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175       original_child_id_(web_contents->GetRenderProcessHost()->GetID()), | 175       original_child_id_(web_contents->GetRenderProcessHost()->GetID()), | 
| 176       original_rvh_id_(web_contents->GetRenderViewHost()->GetRoutingID()), | 176       original_rvh_id_(web_contents->GetRenderViewHost()->GetRoutingID()), | 
| 177       should_revert_web_contents_title_(false), | 177       should_revert_web_contents_title_(false), | 
| 178       web_contents_was_loading_(false), | 178       web_contents_was_loading_(false), | 
| 179       resource_dispatcher_host_notified_(false), | 179       resource_dispatcher_host_notified_(false), | 
| 180       rvh_delegate_view_(new InterstitialPageRVHDelegateView(this)), | 180       rvh_delegate_view_(new InterstitialPageRVHDelegateView(this)), | 
| 181       create_view_(true), | 181       create_view_(true), | 
| 182       delegate_(delegate), | 182       delegate_(delegate), | 
| 183       weak_ptr_factory_(this) { | 183       weak_ptr_factory_(this) { | 
| 184   InitInterstitialPageMap(); | 184   InitInterstitialPageMap(); | 
| 185   // It would be inconsistent to create an interstitial with no new navigation |  | 
| 186   // (which is the case when the interstitial was triggered by a sub-resource on |  | 
| 187   // a page) when we have a pending entry (in the process of loading a new top |  | 
| 188   // frame). |  | 
| 189   DCHECK(new_navigation || !web_contents->GetController().GetPendingEntry()); |  | 
| 190 } | 185 } | 
| 191 | 186 | 
| 192 InterstitialPageImpl::~InterstitialPageImpl() { | 187 InterstitialPageImpl::~InterstitialPageImpl() { | 
| 193 } | 188 } | 
| 194 | 189 | 
| 195 void InterstitialPageImpl::Show() { | 190 void InterstitialPageImpl::Show() { | 
| 196   if (!enabled()) | 191   if (!enabled()) | 
| 197     return; | 192     return; | 
| 198 | 193 | 
| 199   // If an interstitial is already showing or about to be shown, close it before | 194   // If an interstitial is already showing or about to be shown, close it before | 
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 943 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( | 938 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( | 
| 944     const LoadCommittedDetails& load_details) { | 939     const LoadCommittedDetails& load_details) { | 
| 945   interstitial_->OnNavigatingAwayOrTabClosing(); | 940   interstitial_->OnNavigatingAwayOrTabClosing(); | 
| 946 } | 941 } | 
| 947 | 942 | 
| 948 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { | 943 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { | 
| 949   interstitial_->OnNavigatingAwayOrTabClosing(); | 944   interstitial_->OnNavigatingAwayOrTabClosing(); | 
| 950 } | 945 } | 
| 951 | 946 | 
| 952 }  // namespace content | 947 }  // namespace content | 
| OLD | NEW | 
|---|