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

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

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge conflicts Created 5 years, 1 month 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 <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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 scoped_refptr<SiteInstance> site_instance = 588 scoped_refptr<SiteInstance> site_instance =
589 SiteInstance::Create(browser_context); 589 SiteInstance::Create(browser_context);
590 DOMStorageContextWrapper* dom_storage_context = 590 DOMStorageContextWrapper* dom_storage_context =
591 static_cast<DOMStorageContextWrapper*>( 591 static_cast<DOMStorageContextWrapper*>(
592 BrowserContext::GetStoragePartition( 592 BrowserContext::GetStoragePartition(
593 browser_context, site_instance.get())->GetDOMStorageContext()); 593 browser_context, site_instance.get())->GetDOMStorageContext());
594 session_storage_namespace_ = 594 session_storage_namespace_ =
595 new SessionStorageNamespaceImpl(dom_storage_context); 595 new SessionStorageNamespaceImpl(dom_storage_context);
596 596
597 // Use the RenderViewHost from our FrameTree. 597 // Use the RenderViewHost from our FrameTree.
598 // TODO(avi): The view routing ID can be restored to MSG_ROUTING_NONE once
599 // RenderViewHostImpl has-a RenderWidgetHostImpl. https://crbug.com/545684
600 int32_t widget_routing_id = site_instance->GetProcess()->GetNextRoutingID();
598 frame_tree_.root()->render_manager()->Init( 601 frame_tree_.root()->render_manager()->Init(
599 browser_context, site_instance.get(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, 602 site_instance.get(), widget_routing_id, MSG_ROUTING_NONE,
600 MSG_ROUTING_NONE); 603 widget_routing_id);
601 return frame_tree_.root()->current_frame_host()->render_view_host(); 604 return frame_tree_.root()->current_frame_host()->render_view_host();
602 } 605 }
603 606
604 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { 607 WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
605 if (!enabled() || !create_view_) 608 if (!enabled() || !create_view_)
606 return NULL; 609 return NULL;
607 WebContentsView* wcv = 610 WebContentsView* wcv =
608 static_cast<WebContentsImpl*>(web_contents())->GetView(); 611 static_cast<WebContentsImpl*>(web_contents())->GetView();
609 RenderWidgetHostViewBase* view = 612 RenderWidgetHostViewBase* view =
610 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false); 613 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 void InterstitialPageImpl::DontCreateViewForTesting() { 757 void InterstitialPageImpl::DontCreateViewForTesting() {
755 create_view_ = false; 758 create_view_ = false;
756 } 759 }
757 760
758 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const { 761 gfx::Rect InterstitialPageImpl::GetRootWindowResizerRect() const {
759 return gfx::Rect(); 762 return gfx::Rect();
760 } 763 }
761 764
762 void InterstitialPageImpl::CreateNewWindow( 765 void InterstitialPageImpl::CreateNewWindow(
763 SiteInstance* source_site_instance, 766 SiteInstance* source_site_instance,
764 int route_id, 767 int32_t route_id,
765 int main_frame_route_id, 768 int32_t main_frame_route_id,
769 int32_t main_frame_widget_route_id,
766 const ViewHostMsg_CreateWindow_Params& params, 770 const ViewHostMsg_CreateWindow_Params& params,
767 SessionStorageNamespace* session_storage_namespace) { 771 SessionStorageNamespace* session_storage_namespace) {
768 NOTREACHED() << "InterstitialPage does not support showing popups yet."; 772 NOTREACHED() << "InterstitialPage does not support showing popups yet.";
769 } 773 }
770 774
771 void InterstitialPageImpl::CreateNewWidget(int32 render_process_id, 775 void InterstitialPageImpl::CreateNewWidget(int32 render_process_id,
772 int32 route_id, 776 int32 route_id,
773 blink::WebPopupType popup_type) { 777 blink::WebPopupType popup_type) {
774 NOTREACHED() << "InterstitialPage does not support showing drop-downs yet."; 778 NOTREACHED() << "InterstitialPage does not support showing drop-downs yet.";
775 } 779 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted( 947 void InterstitialPageImpl::UnderlyingContentObserver::NavigationEntryCommitted(
944 const LoadCommittedDetails& load_details) { 948 const LoadCommittedDetails& load_details) {
945 interstitial_->OnNavigatingAwayOrTabClosing(); 949 interstitial_->OnNavigatingAwayOrTabClosing();
946 } 950 }
947 951
948 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() { 952 void InterstitialPageImpl::UnderlyingContentObserver::WebContentsDestroyed() {
949 interstitial_->OnNavigatingAwayOrTabClosing(); 953 interstitial_->OnNavigatingAwayOrTabClosing();
950 } 954 }
951 955
952 } // namespace content 956 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698