| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 return web_contents_; | 556 return web_contents_; |
| 557 } | 557 } |
| 558 | 558 |
| 559 RenderViewHostImpl* InterstitialPageImpl::CreateRenderViewHost() { | 559 RenderViewHostImpl* InterstitialPageImpl::CreateRenderViewHost() { |
| 560 if (!enabled()) | 560 if (!enabled()) |
| 561 return NULL; | 561 return NULL; |
| 562 | 562 |
| 563 // Interstitial pages don't want to share the session storage so we mint a | 563 // Interstitial pages don't want to share the session storage so we mint a |
| 564 // new one. | 564 // new one. |
| 565 BrowserContext* browser_context = web_contents()->GetBrowserContext(); | 565 BrowserContext* browser_context = web_contents()->GetBrowserContext(); |
| 566 scoped_refptr<SiteInstance> site_instance = | 566 scoped_refptr<SiteInstanceImpl> site_instance = |
| 567 SiteInstance::Create(browser_context); | 567 SiteInstanceImpl::Create(browser_context); |
| 568 DOMStorageContextWrapper* dom_storage_context = | 568 DOMStorageContextWrapper* dom_storage_context = |
| 569 static_cast<DOMStorageContextWrapper*>( | 569 static_cast<DOMStorageContextWrapper*>( |
| 570 BrowserContext::GetStoragePartition( | 570 BrowserContext::GetStoragePartition( |
| 571 browser_context, site_instance.get())->GetDOMStorageContext()); | 571 browser_context, site_instance.get())->GetDOMStorageContext()); |
| 572 session_storage_namespace_ = | 572 session_storage_namespace_ = |
| 573 new SessionStorageNamespaceImpl(dom_storage_context); | 573 new SessionStorageNamespaceImpl(dom_storage_context); |
| 574 | 574 |
| 575 // Use the RenderViewHost from our FrameTree. | 575 // Use the RenderViewHost from our FrameTree. |
| 576 // TODO(avi): The view routing ID can be restored to MSG_ROUTING_NONE once | 576 // TODO(avi): The view routing ID can be restored to MSG_ROUTING_NONE once |
| 577 // RenderViewHostImpl has-a RenderWidgetHostImpl. https://crbug.com/545684 | 577 // RenderViewHostImpl has-a RenderWidgetHostImpl. https://crbug.com/545684 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( | 924 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( |
| 925 const LoadCommittedDetails& load_details) { | 925 const LoadCommittedDetails& load_details) { |
| 926 interstitial_->OnNavigatingAwayOrTabClosing(); | 926 interstitial_->OnNavigatingAwayOrTabClosing(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { | 929 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { |
| 930 interstitial_->OnNavigatingAwayOrTabClosing(); | 930 interstitial_->OnNavigatingAwayOrTabClosing(); |
| 931 } | 931 } |
| 932 | 932 |
| 933 } // namespace content | 933 } // namespace content |
| OLD | NEW |