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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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*>( |
494 BrowserContext::GetStoragePartition( | 494 BrowserContext::GetStoragePartition( |
495 browser_context, site_instance)->GetDOMStorageContext()); | 495 browser_context, site_instance)->GetDOMStorageContext()); |
496 SessionStorageNamespaceImpl* session_storage_namespace_impl = | 496 SessionStorageNamespaceImpl* session_storage_namespace_impl = |
497 new SessionStorageNamespaceImpl(dom_storage_context); | 497 new SessionStorageNamespaceImpl(dom_storage_context); |
498 | 498 |
499 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( | 499 RenderViewHostImpl* render_view_host = new RenderViewHostImpl( |
500 site_instance, this, this, MSG_ROUTING_NONE, false, | 500 site_instance, this, this, MSG_ROUTING_NONE, MSG_ROUTING_NONE, false, |
501 session_storage_namespace_impl); | 501 session_storage_namespace_impl); |
502 web_contents_->RenderViewForInterstitialPageCreated(render_view_host); | 502 web_contents_->RenderViewForInterstitialPageCreated(render_view_host); |
503 return render_view_host; | 503 return render_view_host; |
504 } | 504 } |
505 | 505 |
506 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 506 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
507 if (!enabled() || !create_view_) | 507 if (!enabled() || !create_view_) |
508 return NULL; | 508 return NULL; |
509 WebContentsView* web_contents_view = web_contents()->GetView(); | 509 WebContentsView* web_contents_view = web_contents()->GetView(); |
510 WebContentsViewPort* web_contents_view_port = | 510 WebContentsViewPort* web_contents_view_port = |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 void InterstitialPageImpl::DontCreateViewForTesting() { | 659 void InterstitialPageImpl::DontCreateViewForTesting() { |
660 create_view_ = false; | 660 create_view_ = false; |
661 } | 661 } |
662 | 662 |
663 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const { | 663 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const { |
664 return gfx::Rect(); | 664 return gfx::Rect(); |
665 } | 665 } |
666 | 666 |
667 void InterstitialPageImpl::CreateNewWindow( | 667 void InterstitialPageImpl::CreateNewWindow( |
668 int route_id, | 668 int route_id, |
| 669 int main_frame_route_id, |
669 const ViewHostMsg_CreateWindow_Params& params, | 670 const ViewHostMsg_CreateWindow_Params& params, |
670 SessionStorageNamespace* session_storage_namespace) { | 671 SessionStorageNamespace* session_storage_namespace) { |
671 NOTREACHED() << "InterstitialPage does not support showing popups yet."; | 672 NOTREACHED() << "InterstitialPage does not support showing popups yet."; |
672 } | 673 } |
673 | 674 |
674 void InterstitialPageImpl::CreateNewWidget(int route_id, | 675 void InterstitialPageImpl::CreateNewWidget(int route_id, |
675 WebKit::WebPopupType popup_type) { | 676 WebKit::WebPopupType popup_type) { |
676 NOTREACHED() << "InterstitialPage does not support showing drop-downs yet."; | 677 NOTREACHED() << "InterstitialPage does not support showing drop-downs yet."; |
677 } | 678 } |
678 | 679 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 | 806 |
806 web_contents->GetDelegateView()->TakeFocus(reverse); | 807 web_contents->GetDelegateView()->TakeFocus(reverse); |
807 } | 808 } |
808 | 809 |
809 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 810 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
810 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 811 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
811 int active_match_ordinal, bool final_update) { | 812 int active_match_ordinal, bool final_update) { |
812 } | 813 } |
813 | 814 |
814 } // namespace content | 815 } // namespace content |
OLD | NEW |