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/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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 void RenderViewHostImpl::CreateNewWindow( | 977 void RenderViewHostImpl::CreateNewWindow( |
978 int route_id, | 978 int route_id, |
979 int main_frame_route_id, | 979 int main_frame_route_id, |
980 const ViewHostMsg_CreateWindow_Params& params, | 980 const ViewHostMsg_CreateWindow_Params& params, |
981 SessionStorageNamespace* session_storage_namespace) { | 981 SessionStorageNamespace* session_storage_namespace) { |
982 ViewHostMsg_CreateWindow_Params validated_params(params); | 982 ViewHostMsg_CreateWindow_Params validated_params(params); |
983 GetProcess()->FilterURL(false, &validated_params.target_url); | 983 GetProcess()->FilterURL(false, &validated_params.target_url); |
984 GetProcess()->FilterURL(false, &validated_params.opener_url); | 984 GetProcess()->FilterURL(false, &validated_params.opener_url); |
985 GetProcess()->FilterURL(true, &validated_params.opener_security_origin); | 985 GetProcess()->FilterURL(true, &validated_params.opener_security_origin); |
986 | 986 |
987 delegate_->CreateNewWindow( | 987 delegate_->CreateNewWindow(GetSiteInstance(), route_id, main_frame_route_id, |
988 GetProcess()->GetID(), route_id, main_frame_route_id, validated_params, | 988 validated_params, session_storage_namespace); |
989 session_storage_namespace); | |
990 } | 989 } |
991 | 990 |
992 void RenderViewHostImpl::CreateNewWidget(int route_id, | 991 void RenderViewHostImpl::CreateNewWidget(int route_id, |
993 blink::WebPopupType popup_type) { | 992 blink::WebPopupType popup_type) { |
994 delegate_->CreateNewWidget(GetProcess()->GetID(), route_id, popup_type); | 993 delegate_->CreateNewWidget(GetProcess()->GetID(), route_id, popup_type); |
995 } | 994 } |
996 | 995 |
997 void RenderViewHostImpl::CreateNewFullscreenWidget(int route_id) { | 996 void RenderViewHostImpl::CreateNewFullscreenWidget(int route_id) { |
998 delegate_->CreateNewFullscreenWidget(GetProcess()->GetID(), route_id); | 997 delegate_->CreateNewFullscreenWidget(GetProcess()->GetID(), route_id); |
999 } | 998 } |
1000 | 999 |
1001 void RenderViewHostImpl::OnShowView(int route_id, | 1000 void RenderViewHostImpl::OnShowView(int route_id, |
1002 WindowOpenDisposition disposition, | 1001 WindowOpenDisposition disposition, |
1003 const gfx::Rect& initial_rect, | 1002 const gfx::Rect& initial_rect, |
1004 bool user_gesture) { | 1003 bool user_gesture) { |
1005 if (is_active_) { | 1004 delegate_->ShowCreatedWindow(route_id, disposition, initial_rect, |
1006 delegate_->ShowCreatedWindow( | 1005 user_gesture); |
1007 route_id, disposition, initial_rect, user_gesture); | |
1008 } | |
1009 Send(new ViewMsg_Move_ACK(route_id)); | 1006 Send(new ViewMsg_Move_ACK(route_id)); |
1010 } | 1007 } |
1011 | 1008 |
1012 void RenderViewHostImpl::OnShowWidget(int route_id, | 1009 void RenderViewHostImpl::OnShowWidget(int route_id, |
1013 const gfx::Rect& initial_rect) { | 1010 const gfx::Rect& initial_rect) { |
1014 if (is_active_) | 1011 if (is_active_) |
1015 delegate_->ShowCreatedWidget(route_id, initial_rect); | 1012 delegate_->ShowCreatedWidget(route_id, initial_rect); |
1016 Send(new ViewMsg_Move_ACK(route_id)); | 1013 Send(new ViewMsg_Move_ACK(route_id)); |
1017 } | 1014 } |
1018 | 1015 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1424 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1428 policy->GrantReadFile(GetProcess()->GetID(), file); | 1425 policy->GrantReadFile(GetProcess()->GetID(), file); |
1429 } | 1426 } |
1430 } | 1427 } |
1431 | 1428 |
1432 void RenderViewHostImpl::SelectWordAroundCaret() { | 1429 void RenderViewHostImpl::SelectWordAroundCaret() { |
1433 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1430 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1434 } | 1431 } |
1435 | 1432 |
1436 } // namespace content | 1433 } // namespace content |
OLD | NEW |