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

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

Issue 1874543002: Inside of content, prefer SiteInstanceImpl to SiteInstance. Base URL: https://chromium.googlesource.com/chromium/src.git@site_instance_unittest
Patch Set: Created 4 years, 8 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 <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
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698