| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } | 285 } |
| 286 | 286 |
| 287 // Shutdown the RVH asynchronously, as we may have been called from a RVH | 287 // Shutdown the RVH asynchronously, as we may have been called from a RVH |
| 288 // delegate method, and we can't delete the RVH out from under itself. | 288 // delegate method, and we can't delete the RVH out from under itself. |
| 289 base::MessageLoop::current()->PostNonNestableTask( | 289 base::MessageLoop::current()->PostNonNestableTask( |
| 290 FROM_HERE, | 290 FROM_HERE, |
| 291 base::Bind(&InterstitialPageImpl::Shutdown, | 291 base::Bind(&InterstitialPageImpl::Shutdown, |
| 292 weak_ptr_factory_.GetWeakPtr(), | 292 weak_ptr_factory_.GetWeakPtr(), |
| 293 render_view_host_)); | 293 render_view_host_)); |
| 294 render_view_host_ = NULL; | 294 render_view_host_ = NULL; |
| 295 frame_tree_.SwapMainFrame(NULL); | 295 frame_tree_.ResetForMainFrameSwap(); |
| 296 controller_->delegate()->DetachInterstitialPage(); | 296 controller_->delegate()->DetachInterstitialPage(); |
| 297 // Let's revert to the original title if necessary. | 297 // Let's revert to the original title if necessary. |
| 298 NavigationEntry* entry = controller_->GetVisibleEntry(); | 298 NavigationEntry* entry = controller_->GetVisibleEntry(); |
| 299 if (!new_navigation_ && should_revert_web_contents_title_) { | 299 if (!new_navigation_ && should_revert_web_contents_title_) { |
| 300 entry->SetTitle(original_web_contents_title_); | 300 entry->SetTitle(original_web_contents_title_); |
| 301 controller_->delegate()->NotifyNavigationStateChanged( | 301 controller_->delegate()->NotifyNavigationStateChanged( |
| 302 INVALIDATE_TYPE_TITLE); | 302 INVALIDATE_TYPE_TITLE); |
| 303 } | 303 } |
| 304 | 304 |
| 305 InterstitialPageMap::iterator iter = | 305 InterstitialPageMap::iterator iter = |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 DOMStorageContextWrapper* dom_storage_context = | 520 DOMStorageContextWrapper* dom_storage_context = |
| 521 static_cast<DOMStorageContextWrapper*>( | 521 static_cast<DOMStorageContextWrapper*>( |
| 522 BrowserContext::GetStoragePartition( | 522 BrowserContext::GetStoragePartition( |
| 523 browser_context, site_instance.get())->GetDOMStorageContext()); | 523 browser_context, site_instance.get())->GetDOMStorageContext()); |
| 524 session_storage_namespace_ = | 524 session_storage_namespace_ = |
| 525 new SessionStorageNamespaceImpl(dom_storage_context); | 525 new SessionStorageNamespaceImpl(dom_storage_context); |
| 526 | 526 |
| 527 return RenderViewHostFactory::Create(site_instance.get(), | 527 return RenderViewHostFactory::Create(site_instance.get(), |
| 528 this, | 528 this, |
| 529 this, | 529 this, |
| 530 this, | |
| 531 MSG_ROUTING_NONE, | 530 MSG_ROUTING_NONE, |
| 532 MSG_ROUTING_NONE, | 531 MSG_ROUTING_NONE, |
| 533 false, | 532 false, |
| 534 false); | 533 false); |
| 535 } | 534 } |
| 536 | 535 |
| 537 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 536 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
| 538 if (!enabled() || !create_view_) | 537 if (!enabled() || !create_view_) |
| 539 return NULL; | 538 return NULL; |
| 540 WebContentsView* web_contents_view = web_contents()->GetView(); | 539 WebContentsView* web_contents_view = web_contents()->GetView(); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 | 846 |
| 848 web_contents->GetDelegateView()->TakeFocus(reverse); | 847 web_contents->GetDelegateView()->TakeFocus(reverse); |
| 849 } | 848 } |
| 850 | 849 |
| 851 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 850 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
| 852 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 851 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 853 int active_match_ordinal, bool final_update) { | 852 int active_match_ordinal, bool final_update) { |
| 854 } | 853 } |
| 855 | 854 |
| 856 } // namespace content | 855 } // namespace content |
| OLD | NEW |