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

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

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: rebase Created 3 years, 10 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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 } 584 }
585 585
586 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { 586 WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
587 if (!enabled() || !create_view_) 587 if (!enabled() || !create_view_)
588 return NULL; 588 return NULL;
589 WebContentsView* wcv = 589 WebContentsView* wcv =
590 static_cast<WebContentsImpl*>(web_contents())->GetView(); 590 static_cast<WebContentsImpl*>(web_contents())->GetView();
591 RenderWidgetHostViewBase* view = 591 RenderWidgetHostViewBase* view =
592 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false); 592 wcv->CreateViewForWidget(render_view_host_->GetWidget(), false);
593 RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view); 593 RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view);
594 render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION); 594 render_view_host_->GetMainFrame()->AllowBindings(
595 BINDINGS_POLICY_DOM_AUTOMATION);
595 596
596 render_view_host_->CreateRenderView(MSG_ROUTING_NONE, 597 render_view_host_->CreateRenderView(MSG_ROUTING_NONE,
597 MSG_ROUTING_NONE, 598 MSG_ROUTING_NONE,
598 FrameReplicationState(), 599 FrameReplicationState(),
599 false); 600 false);
600 controller_->delegate()->RenderFrameForInterstitialPageCreated( 601 controller_->delegate()->RenderFrameForInterstitialPageCreated(
601 frame_tree_.root()->current_frame_host()); 602 frame_tree_.root()->current_frame_host());
602 view->SetSize(web_contents()->GetContainerBounds().size()); 603 view->SetSize(web_contents()->GetContainerBounds().size());
603 // Don't show the interstitial until we have navigated to it. 604 // Don't show the interstitial until we have navigated to it.
604 view->Hide(); 605 view->Hide();
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { 957 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
957 WebContentsImpl* web_contents_impl = 958 WebContentsImpl* web_contents_impl =
958 static_cast<WebContentsImpl*>(web_contents_); 959 static_cast<WebContentsImpl*>(web_contents_);
959 if (!web_contents_impl) 960 if (!web_contents_impl)
960 return; 961 return;
961 962
962 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); 963 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor);
963 } 964 }
964 965
965 } // namespace content 966 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698