| 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 2790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2801 params.parent_routing_id = routing_id_; | 2801 params.parent_routing_id = routing_id_; |
| 2802 params.scope = scope; | 2802 params.scope = scope; |
| 2803 params.frame_name = base::UTF16ToUTF8(base::StringPiece16(name)); | 2803 params.frame_name = base::UTF16ToUTF8(base::StringPiece16(name)); |
| 2804 params.frame_unique_name = | 2804 params.frame_unique_name = |
| 2805 base::UTF16ToUTF8(base::StringPiece16(unique_name)); | 2805 base::UTF16ToUTF8(base::StringPiece16(unique_name)); |
| 2806 params.sandbox_flags = sandbox_flags; | 2806 params.sandbox_flags = sandbox_flags; |
| 2807 params.frame_owner_properties = FrameOwnerProperties(frame_owner_properties); | 2807 params.frame_owner_properties = FrameOwnerProperties(frame_owner_properties); |
| 2808 Send(new FrameHostMsg_CreateChildFrame(params, &child_routing_id)); | 2808 Send(new FrameHostMsg_CreateChildFrame(params, &child_routing_id)); |
| 2809 | 2809 |
| 2810 // Allocation of routing id failed, so we can't create a child frame. This can | 2810 // Allocation of routing id failed, so we can't create a child frame. This can |
| 2811 // happen if the synchronous IPC message above has failed. | 2811 // happen if the synchronous IPC message above has failed. This can |
| 2812 if (child_routing_id == MSG_ROUTING_NONE) { | 2812 // legitimately happen when the browser process has already destroyed |
| 2813 NOTREACHED() << "Failed to allocate routing id for child frame."; | 2813 // RenderProcessHost, but the renderer process hasn't quit yet. |
| 2814 if (child_routing_id == MSG_ROUTING_NONE) |
| 2814 return nullptr; | 2815 return nullptr; |
| 2815 } | |
| 2816 | 2816 |
| 2817 // This method is always called by local frames, never remote frames. | 2817 // This method is always called by local frames, never remote frames. |
| 2818 | 2818 |
| 2819 // Tracing analysis uses this to find main frames when this value is | 2819 // Tracing analysis uses this to find main frames when this value is |
| 2820 // MSG_ROUTING_NONE, and build the frame tree otherwise. | 2820 // MSG_ROUTING_NONE, and build the frame tree otherwise. |
| 2821 TRACE_EVENT2("navigation", "RenderFrameImpl::createChildFrame", | 2821 TRACE_EVENT2("navigation", "RenderFrameImpl::createChildFrame", |
| 2822 "id", routing_id_, | 2822 "id", routing_id_, |
| 2823 "child", child_routing_id); | 2823 "child", child_routing_id); |
| 2824 | 2824 |
| 2825 // Create the RenderFrame and WebLocalFrame, linking the two. | 2825 // Create the RenderFrame and WebLocalFrame, linking the two. |
| (...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6340 // event target. Potentially a Pepper plugin will receive the event. | 6340 // event target. Potentially a Pepper plugin will receive the event. |
| 6341 // In order to tell whether a plugin gets the last mouse event and which it | 6341 // In order to tell whether a plugin gets the last mouse event and which it |
| 6342 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6342 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6343 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6343 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6344 // |pepper_last_mouse_event_target_|. | 6344 // |pepper_last_mouse_event_target_|. |
| 6345 pepper_last_mouse_event_target_ = nullptr; | 6345 pepper_last_mouse_event_target_ = nullptr; |
| 6346 #endif | 6346 #endif |
| 6347 } | 6347 } |
| 6348 | 6348 |
| 6349 } // namespace content | 6349 } // namespace content |
| OLD | NEW |