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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 // static | 940 // static |
941 void RenderFrameImpl::CreateFrame( | 941 void RenderFrameImpl::CreateFrame( |
942 int routing_id, | 942 int routing_id, |
943 int proxy_routing_id, | 943 int proxy_routing_id, |
944 int opener_routing_id, | 944 int opener_routing_id, |
945 int parent_routing_id, | 945 int parent_routing_id, |
946 int previous_sibling_routing_id, | 946 int previous_sibling_routing_id, |
947 const FrameReplicationState& replicated_state, | 947 const FrameReplicationState& replicated_state, |
948 CompositorDependencies* compositor_deps, | 948 CompositorDependencies* compositor_deps, |
949 const FrameMsg_NewFrame_WidgetParams& widget_params, | 949 const FrameMsg_NewFrame_WidgetParams& widget_params, |
950 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 950 const FrameOwnerProperties& frame_owner_properties) { |
951 blink::WebLocalFrame* web_frame; | 951 blink::WebLocalFrame* web_frame; |
952 RenderFrameImpl* render_frame; | 952 RenderFrameImpl* render_frame; |
953 if (proxy_routing_id == MSG_ROUTING_NONE) { | 953 if (proxy_routing_id == MSG_ROUTING_NONE) { |
954 RenderFrameProxy* parent_proxy = | 954 RenderFrameProxy* parent_proxy = |
955 RenderFrameProxy::FromRoutingID(parent_routing_id); | 955 RenderFrameProxy::FromRoutingID(parent_routing_id); |
956 // If the browser is sending a valid parent routing id, it should already | 956 // If the browser is sending a valid parent routing id, it should already |
957 // be created and registered. | 957 // be created and registered. |
958 CHECK(parent_proxy); | 958 CHECK(parent_proxy); |
959 blink::WebRemoteFrame* parent_web_frame = parent_proxy->web_frame(); | 959 blink::WebRemoteFrame* parent_web_frame = parent_proxy->web_frame(); |
960 | 960 |
961 blink::WebFrame* previous_sibling_web_frame = nullptr; | 961 blink::WebFrame* previous_sibling_web_frame = nullptr; |
962 RenderFrameProxy* previous_sibling_proxy = | 962 RenderFrameProxy* previous_sibling_proxy = |
963 RenderFrameProxy::FromRoutingID(previous_sibling_routing_id); | 963 RenderFrameProxy::FromRoutingID(previous_sibling_routing_id); |
964 if (previous_sibling_proxy) | 964 if (previous_sibling_proxy) |
965 previous_sibling_web_frame = previous_sibling_proxy->web_frame(); | 965 previous_sibling_web_frame = previous_sibling_proxy->web_frame(); |
966 | 966 |
967 // Create the RenderFrame and WebLocalFrame, linking the two. | 967 // Create the RenderFrame and WebLocalFrame, linking the two. |
968 render_frame = | 968 render_frame = |
969 RenderFrameImpl::Create(parent_proxy->render_view(), routing_id); | 969 RenderFrameImpl::Create(parent_proxy->render_view(), routing_id); |
970 render_frame->InitializeBlameContext(FromRoutingID(parent_routing_id)); | 970 render_frame->InitializeBlameContext(FromRoutingID(parent_routing_id)); |
971 web_frame = parent_web_frame->createLocalChild( | 971 web_frame = parent_web_frame->createLocalChild( |
972 replicated_state.scope, WebString::fromUTF8(replicated_state.name), | 972 replicated_state.scope, WebString::fromUTF8(replicated_state.name), |
973 WebString::fromUTF8(replicated_state.unique_name), | 973 WebString::fromUTF8(replicated_state.unique_name), |
974 replicated_state.sandbox_flags, render_frame, | 974 replicated_state.sandbox_flags, render_frame, |
975 previous_sibling_web_frame, frame_owner_properties, | 975 previous_sibling_web_frame, |
| 976 frame_owner_properties.ToWebFrameOwnerProperties(), |
976 ResolveOpener(opener_routing_id, nullptr)); | 977 ResolveOpener(opener_routing_id, nullptr)); |
977 | 978 |
978 // The RenderFrame is created and inserted into the frame tree in the above | 979 // The RenderFrame is created and inserted into the frame tree in the above |
979 // call to createLocalChild. | 980 // call to createLocalChild. |
980 render_frame->in_frame_tree_ = true; | 981 render_frame->in_frame_tree_ = true; |
981 } else { | 982 } else { |
982 RenderFrameProxy* proxy = | 983 RenderFrameProxy* proxy = |
983 RenderFrameProxy::FromRoutingID(proxy_routing_id); | 984 RenderFrameProxy::FromRoutingID(proxy_routing_id); |
984 // The remote frame could've been detached while the remote-to-local | 985 // The remote frame could've been detached while the remote-to-local |
985 // navigation was being initiated in the browser process. Drop the | 986 // navigation was being initiated in the browser process. Drop the |
(...skipping 5368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6354 // event target. Potentially a Pepper plugin will receive the event. | 6355 // event target. Potentially a Pepper plugin will receive the event. |
6355 // In order to tell whether a plugin gets the last mouse event and which it | 6356 // In order to tell whether a plugin gets the last mouse event and which it |
6356 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6357 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6357 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6358 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6358 // |pepper_last_mouse_event_target_|. | 6359 // |pepper_last_mouse_event_target_|. |
6359 pepper_last_mouse_event_target_ = nullptr; | 6360 pepper_last_mouse_event_target_ = nullptr; |
6360 #endif | 6361 #endif |
6361 } | 6362 } |
6362 | 6363 |
6363 } // namespace content | 6364 } // namespace content |
OLD | NEW |