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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1224363002: OOPIF: Fix window.open to work from frames with remote parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Charlie's comments Created 5 years, 5 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 (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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 void RenderViewHostImpl::CreateNewWindow( 978 void RenderViewHostImpl::CreateNewWindow(
979 int route_id, 979 int route_id,
980 int main_frame_route_id, 980 int main_frame_route_id,
981 const ViewHostMsg_CreateWindow_Params& params, 981 const ViewHostMsg_CreateWindow_Params& params,
982 SessionStorageNamespace* session_storage_namespace) { 982 SessionStorageNamespace* session_storage_namespace) {
983 ViewHostMsg_CreateWindow_Params validated_params(params); 983 ViewHostMsg_CreateWindow_Params validated_params(params);
984 GetProcess()->FilterURL(false, &validated_params.target_url); 984 GetProcess()->FilterURL(false, &validated_params.target_url);
985 GetProcess()->FilterURL(false, &validated_params.opener_url); 985 GetProcess()->FilterURL(false, &validated_params.opener_url);
986 GetProcess()->FilterURL(true, &validated_params.opener_security_origin); 986 GetProcess()->FilterURL(true, &validated_params.opener_security_origin);
987 987
988 delegate_->CreateNewWindow( 988 delegate_->CreateNewWindow(GetSiteInstance(), route_id, main_frame_route_id,
989 GetProcess()->GetID(), route_id, main_frame_route_id, validated_params, 989 validated_params, session_storage_namespace);
990 session_storage_namespace);
991 } 990 }
992 991
993 void RenderViewHostImpl::CreateNewWidget(int route_id, 992 void RenderViewHostImpl::CreateNewWidget(int route_id,
994 blink::WebPopupType popup_type) { 993 blink::WebPopupType popup_type) {
995 delegate_->CreateNewWidget(GetProcess()->GetID(), route_id, popup_type); 994 delegate_->CreateNewWidget(GetProcess()->GetID(), route_id, popup_type);
996 } 995 }
997 996
998 void RenderViewHostImpl::CreateNewFullscreenWidget(int route_id) { 997 void RenderViewHostImpl::CreateNewFullscreenWidget(int route_id) {
999 delegate_->CreateNewFullscreenWidget(GetProcess()->GetID(), route_id); 998 delegate_->CreateNewFullscreenWidget(GetProcess()->GetID(), route_id);
1000 } 999 }
1001 1000
1002 void RenderViewHostImpl::OnShowView(int route_id, 1001 void RenderViewHostImpl::OnShowView(int route_id,
1003 WindowOpenDisposition disposition, 1002 WindowOpenDisposition disposition,
1004 const gfx::Rect& initial_rect, 1003 const gfx::Rect& initial_rect,
1005 bool user_gesture) { 1004 bool user_gesture) {
1006 if (is_active_) { 1005 delegate_->ShowCreatedWindow(route_id, disposition, initial_rect,
1007 delegate_->ShowCreatedWindow( 1006 user_gesture);
1008 route_id, disposition, initial_rect, user_gesture);
1009 }
1010 Send(new ViewMsg_Move_ACK(route_id)); 1007 Send(new ViewMsg_Move_ACK(route_id));
1011 } 1008 }
1012 1009
1013 void RenderViewHostImpl::OnShowWidget(int route_id, 1010 void RenderViewHostImpl::OnShowWidget(int route_id,
1014 const gfx::Rect& initial_rect) { 1011 const gfx::Rect& initial_rect) {
1015 if (is_active_) 1012 delegate_->ShowCreatedWidget(route_id, initial_rect);
Charlie Reis 2015/07/10 21:44:49 Let's leave this.
alexmos 2015/07/10 23:03:02 Done.
1016 delegate_->ShowCreatedWidget(route_id, initial_rect);
1017 Send(new ViewMsg_Move_ACK(route_id)); 1013 Send(new ViewMsg_Move_ACK(route_id));
1018 } 1014 }
1019 1015
1020 void RenderViewHostImpl::OnShowFullscreenWidget(int route_id) { 1016 void RenderViewHostImpl::OnShowFullscreenWidget(int route_id) {
1021 if (is_active_) 1017 delegate_->ShowCreatedFullscreenWidget(route_id);
Charlie Reis 2015/07/10 21:44:49 Let's leave this.
alexmos 2015/07/10 23:03:02 Done.
1022 delegate_->ShowCreatedFullscreenWidget(route_id);
1023 Send(new ViewMsg_Move_ACK(route_id)); 1018 Send(new ViewMsg_Move_ACK(route_id));
1024 } 1019 }
1025 1020
1026 void RenderViewHostImpl::OnRenderViewReady() { 1021 void RenderViewHostImpl::OnRenderViewReady() {
1027 render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING; 1022 render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING;
1028 SendScreenRects(); 1023 SendScreenRects();
1029 WasResized(); 1024 WasResized();
1030 delegate_->RenderViewReady(this); 1025 delegate_->RenderViewReady(this);
1031 } 1026 }
1032 1027
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 if (!policy->CanReadFile(GetProcess()->GetID(), file)) 1423 if (!policy->CanReadFile(GetProcess()->GetID(), file))
1429 policy->GrantReadFile(GetProcess()->GetID(), file); 1424 policy->GrantReadFile(GetProcess()->GetID(), file);
1430 } 1425 }
1431 } 1426 }
1432 1427
1433 void RenderViewHostImpl::SelectWordAroundCaret() { 1428 void RenderViewHostImpl::SelectWordAroundCaret() {
1434 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1429 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1435 } 1430 }
1436 1431
1437 } // namespace content 1432 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698