| 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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if (is_active_) |
| 1016 delegate_->ShowCreatedWidget(route_id, initial_rect); | 1013 delegate_->ShowCreatedWidget(route_id, initial_rect); |
| 1017 Send(new ViewMsg_Move_ACK(route_id)); | 1014 Send(new ViewMsg_Move_ACK(route_id)); |
| 1018 } | 1015 } |
| 1019 | 1016 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1425 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
| 1429 policy->GrantReadFile(GetProcess()->GetID(), file); | 1426 policy->GrantReadFile(GetProcess()->GetID(), file); |
| 1430 } | 1427 } |
| 1431 } | 1428 } |
| 1432 | 1429 |
| 1433 void RenderViewHostImpl::SelectWordAroundCaret() { | 1430 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1434 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1431 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1435 } | 1432 } |
| 1436 | 1433 |
| 1437 } // namespace content | 1434 } // namespace content |
| OLD | NEW |