| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/interstitial_page_impl.h" | 5 #include "content/browser/web_contents/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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 483 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 483 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 
| 484   if (!enabled()) | 484   if (!enabled()) | 
| 485     return NULL; | 485     return NULL; | 
| 486 | 486 | 
| 487   // Interstitial pages don't want to share the session storage so we mint a | 487   // Interstitial pages don't want to share the session storage so we mint a | 
| 488   // new one. | 488   // new one. | 
| 489   BrowserContext* browser_context = web_contents()->GetBrowserContext(); | 489   BrowserContext* browser_context = web_contents()->GetBrowserContext(); | 
| 490   scoped_refptr<SiteInstance> site_instance = | 490   scoped_refptr<SiteInstance> site_instance = | 
| 491       SiteInstance::Create(browser_context); | 491       SiteInstance::Create(browser_context); | 
| 492   DOMStorageContextImpl* dom_storage_context = | 492   DOMStorageContextImpl* dom_storage_context = | 
| 493       static_cast<DOMStorageContextImpl*>( | 493       static_cast<DOMStorageContextImpl*>(BrowserContext::GetStoragePartition( | 
| 494           BrowserContext::GetStoragePartition( | 494           browser_context, site_instance.get())->GetDOMStorageContext()); | 
| 495               browser_context, site_instance)->GetDOMStorageContext()); |  | 
| 496   SessionStorageNamespaceImpl* session_storage_namespace_impl = | 495   SessionStorageNamespaceImpl* session_storage_namespace_impl = | 
| 497       new SessionStorageNamespaceImpl(dom_storage_context); | 496       new SessionStorageNamespaceImpl(dom_storage_context); | 
| 498 | 497 | 
| 499   RenderViewHostImpl* render_view_host = new RenderViewHostImpl( | 498   RenderViewHostImpl* render_view_host = | 
| 500       site_instance, this, this, MSG_ROUTING_NONE, MSG_ROUTING_NONE, false, | 499       new RenderViewHostImpl(site_instance.get(), | 
| 501       session_storage_namespace_impl); | 500                              this, | 
|  | 501                              this, | 
|  | 502                              MSG_ROUTING_NONE, | 
|  | 503                              MSG_ROUTING_NONE, | 
|  | 504                              false, | 
|  | 505                              session_storage_namespace_impl); | 
| 502   web_contents_->RenderViewForInterstitialPageCreated(render_view_host); | 506   web_contents_->RenderViewForInterstitialPageCreated(render_view_host); | 
| 503   return render_view_host; | 507   return render_view_host; | 
| 504 } | 508 } | 
| 505 | 509 | 
| 506 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 510 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 
| 507   if (!enabled() || !create_view_) | 511   if (!enabled() || !create_view_) | 
| 508     return NULL; | 512     return NULL; | 
| 509   WebContentsView* web_contents_view = web_contents()->GetView(); | 513   WebContentsView* web_contents_view = web_contents()->GetView(); | 
| 510   WebContentsViewPort* web_contents_view_port = | 514   WebContentsViewPort* web_contents_view_port = | 
| 511       static_cast<WebContentsViewPort*>(web_contents_view); | 515       static_cast<WebContentsViewPort*>(web_contents_view); | 
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 806 | 810 | 
| 807   web_contents->GetDelegateView()->TakeFocus(reverse); | 811   web_contents->GetDelegateView()->TakeFocus(reverse); | 
| 808 } | 812 } | 
| 809 | 813 | 
| 810 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 814 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 
| 811     int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 815     int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 
| 812     int active_match_ordinal, bool final_update) { | 816     int active_match_ordinal, bool final_update) { | 
| 813 } | 817 } | 
| 814 | 818 | 
| 815 }  // namespace content | 819 }  // namespace content | 
| OLD | NEW | 
|---|