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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 } | 581 } |
582 | 582 |
583 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 583 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
584 if (!enabled() || !create_view_) | 584 if (!enabled() || !create_view_) |
585 return NULL; | 585 return NULL; |
586 WebContentsView* wcv = | 586 WebContentsView* wcv = |
587 static_cast<WebContentsImpl*>(web_contents())->GetView(); | 587 static_cast<WebContentsImpl*>(web_contents())->GetView(); |
588 RenderWidgetHostViewBase* view = | 588 RenderWidgetHostViewBase* view = |
589 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false); | 589 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false); |
590 RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view); | 590 RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view); |
591 render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION); | 591 render_view_host_->GetMainFrame()->AllowBindings( |
| 592 BINDINGS_POLICY_DOM_AUTOMATION); |
592 | 593 |
593 render_view_host_->CreateRenderView(MSG_ROUTING_NONE, | 594 render_view_host_->CreateRenderView(MSG_ROUTING_NONE, |
594 MSG_ROUTING_NONE, | 595 MSG_ROUTING_NONE, |
595 FrameReplicationState(), | 596 FrameReplicationState(), |
596 false); | 597 false); |
597 controller_->delegate()->RenderFrameForInterstitialPageCreated( | 598 controller_->delegate()->RenderFrameForInterstitialPageCreated( |
598 frame_tree_.root()->current_frame_host()); | 599 frame_tree_.root()->current_frame_host()); |
599 view->SetSize(web_contents()->GetContainerBounds().size()); | 600 view->SetSize(web_contents()->GetContainerBounds().size()); |
600 // Don't show the interstitial until we have navigated to it. | 601 // Don't show the interstitial until we have navigated to it. |
601 view->Hide(); | 602 view->Hide(); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { | 953 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { |
953 WebContentsImpl* web_contents_impl = | 954 WebContentsImpl* web_contents_impl = |
954 static_cast<WebContentsImpl*>(web_contents_); | 955 static_cast<WebContentsImpl*>(web_contents_); |
955 if (!web_contents_impl) | 956 if (!web_contents_impl) |
956 return; | 957 return; |
957 | 958 |
958 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); | 959 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); |
959 } | 960 } |
960 | 961 |
961 } // namespace content | 962 } // namespace content |
OLD | NEW |