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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
245 // FrameTreeNode. The proper way to check whether a frame is loading is to | 245 // FrameTreeNode. The proper way to check whether a frame is loading is to |
246 // call FrameTreeNode::IsLoading. | 246 // call FrameTreeNode::IsLoading. |
247 bool is_loading() const { return is_loading_; } | 247 bool is_loading() const { return is_loading_; } |
248 | 248 |
249 // Sets this RenderFrameHost loading state. This is only used in the case of | 249 // Sets this RenderFrameHost loading state. This is only used in the case of |
250 // transfer navigations, where no DidStart/DidStopLoading notifications | 250 // transfer navigations, where no DidStart/DidStopLoading notifications |
251 // should be sent during the transfer. | 251 // should be sent during the transfer. |
252 // TODO(clamy): Remove this once PlzNavigate ships. | 252 // TODO(clamy): Remove this once PlzNavigate ships. |
253 void set_is_loading(bool is_loading) { is_loading_ = is_loading; } | 253 void set_is_loading(bool is_loading) { is_loading_ = is_loading; } |
254 | 254 |
255 // This returns the RenderFrameHost's owned RenderWidgetHost if it has one, | 255 // Returns the RenderWidgetHostImpl attached to this frame or the nearest |
Charlie Reis
2016/05/27 22:50:28
nit: owned by this frame or its nearest
(Is that
kenrb
2016/05/30 19:39:54
I think it's accurate enough. Even though technica
| |
256 // or else it returns nullptr. | 256 // ancestor frame, which could potentially be the root. For most input |
257 // If the RenderFrameHost is the page's main frame, this returns instead a | 257 // and rendering related purposes, GetView() should be preferred and |
258 // pointer to the RenderViewHost (which inherits RenderWidgetHost). | 258 // RenderWidgetHostViewBase methods used. Unlike GetView(), |
259 // GetRenderWidgetHost() will not return a nullptr. | |
Charlie Reis
2016/05/27 22:50:28
nit: nullptr after a renderer crash.
(Helpful to
kenrb
2016/05/30 19:39:54
Done.
| |
260 // | |
261 // This method crashes if this RenderFrameHostImpl is not attached to the | |
262 // frame tree. | |
Charlie Reis
2016/05/27 22:50:28
nit: if this RenderFrameHost has no RenderWidgetHo
kenrb
2016/05/30 19:39:54
Done.
| |
259 RenderWidgetHostImpl* GetRenderWidgetHost(); | 263 RenderWidgetHostImpl* GetRenderWidgetHost(); |
260 | 264 |
265 // Returns true if this is a top-level frame, or if this frame's RenderFrame | |
266 // is in a different process from its parent frame. Local roots are | |
267 // distinguished by owning a RenderWidgetHost, which manages input events | |
268 // and painting for this frame and its contiguous local subtree in the | |
269 // renderer process. | |
270 bool IsLocalRoot(); | |
Charlie Reis
2016/05/27 22:50:28
nit: Let's move this above GetRenderWidgetHost(),
kenrb
2016/05/30 19:39:54
Done.
| |
271 | |
261 GlobalFrameRoutingId GetGlobalFrameRoutingId(); | 272 GlobalFrameRoutingId GetGlobalFrameRoutingId(); |
262 | 273 |
263 // This function is called when this is a swapped out RenderFrameHost that | 274 // This function is called when this is a swapped out RenderFrameHost that |
264 // lives in the same process as the parent frame. The | 275 // lives in the same process as the parent frame. The |
265 // |cross_process_frame_connector| allows the non-swapped-out | 276 // |cross_process_frame_connector| allows the non-swapped-out |
266 // RenderFrameHost for a frame to communicate with the parent process | 277 // RenderFrameHost for a frame to communicate with the parent process |
267 // so that it may composite drawing data. | 278 // so that it may composite drawing data. |
268 // | 279 // |
269 // Ownership is not transfered. | 280 // Ownership is not transfered. |
270 void set_cross_process_frame_connector( | 281 void set_cross_process_frame_connector( |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
979 | 990 |
980 // NOTE: This must be the last member. | 991 // NOTE: This must be the last member. |
981 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 992 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
982 | 993 |
983 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 994 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
984 }; | 995 }; |
985 | 996 |
986 } // namespace content | 997 } // namespace content |
987 | 998 |
988 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 999 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |