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 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // frame belongs to. | 123 // frame belongs to. |
124 // Callers *must* call |SetWebFrame| immediately after creation. | 124 // Callers *must* call |SetWebFrame| immediately after creation. |
125 // Note: This is called only when RenderFrame is created by Blink through | 125 // Note: This is called only when RenderFrame is created by Blink through |
126 // createChildFrame. | 126 // createChildFrame. |
127 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. | 127 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. |
128 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | 128 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
129 | 129 |
130 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame | 130 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame |
131 // identified by |parent_routing_id| or as the top-level frame if the latter | 131 // identified by |parent_routing_id| or as the top-level frame if the latter |
132 // is MSG_ROUTING_NONE. If |proxy_routing_id| is MSG_ROUTING_NONE, it creates | 132 // is MSG_ROUTING_NONE. If |proxy_routing_id| is MSG_ROUTING_NONE, it creates |
133 // the Blink WebLocalFrame and inserts it in the proper place in the frame | 133 // the Blink WebLocalFrame and inserts it into the frame tree after the frame |
134 // tree. Otherwise, the frame is semi-orphaned until it commits, at which | 134 // identified by |previous_sibling_routing_id|, or as the first child if |
135 // point it replaces the proxy identified by |proxy_routing_id|. | 135 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
136 // Note: This is called only when RenderFrame is being created in response to | 136 // semi-orphaned until it commits, at which point it replaces the proxy |
137 // IPC message from the browser process. All other frame creation is driven | 137 // identified by |proxy_routing_id|. Note: This is called only when |
138 // through Blink and Create. | 138 // RenderFrame is being created in response to IPC message from the browser |
| 139 // process. All other frame creation is driven through Blink and Create. |
139 static void CreateFrame(int routing_id, | 140 static void CreateFrame(int routing_id, |
140 int parent_routing_id, | 141 int parent_routing_id, |
| 142 int previous_sibling_routing_id, |
141 int proxy_routing_id, | 143 int proxy_routing_id, |
142 const FrameReplicationState& replicated_state, | 144 const FrameReplicationState& replicated_state, |
143 CompositorDependencies* compositor_deps, | 145 CompositorDependencies* compositor_deps, |
144 const FrameMsg_NewFrame_WidgetParams& params); | 146 const FrameMsg_NewFrame_WidgetParams& params); |
145 | 147 |
146 // Returns the RenderFrameImpl for the given routing ID. | 148 // Returns the RenderFrameImpl for the given routing ID. |
147 static RenderFrameImpl* FromRoutingID(int routing_id); | 149 static RenderFrameImpl* FromRoutingID(int routing_id); |
148 | 150 |
149 // Just like RenderFrame::FromWebFrame but returns the implementation. | 151 // Just like RenderFrame::FromWebFrame but returns the implementation. |
150 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 152 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 #endif | 948 #endif |
947 | 949 |
948 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 950 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
949 | 951 |
950 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 952 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
951 }; | 953 }; |
952 | 954 |
953 } // namespace content | 955 } // namespace content |
954 | 956 |
955 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 957 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |