Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 616133002: Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace content { 44 namespace content {
45 45
46 class CrossProcessFrameConnector; 46 class CrossProcessFrameConnector;
47 class CrossSiteTransferringRequest; 47 class CrossSiteTransferringRequest;
48 class FrameTree; 48 class FrameTree;
49 class FrameTreeNode; 49 class FrameTreeNode;
50 class RenderFrameHostDelegate; 50 class RenderFrameHostDelegate;
51 class RenderFrameProxyHost; 51 class RenderFrameProxyHost;
52 class RenderProcessHost; 52 class RenderProcessHost;
53 class RenderViewHostImpl; 53 class RenderViewHostImpl;
54 class RenderWidgetHostDelegate;
54 class RenderWidgetHostImpl; 55 class RenderWidgetHostImpl;
55 struct ContextMenuParams; 56 struct ContextMenuParams;
56 struct GlobalRequestID; 57 struct GlobalRequestID;
57 struct Referrer; 58 struct Referrer;
58 struct ShowDesktopNotificationHostMsgParams; 59 struct ShowDesktopNotificationHostMsgParams;
59 struct TransitionLayerData; 60 struct TransitionLayerData;
60 61
61 class CONTENT_EXPORT RenderFrameHostImpl 62 class CONTENT_EXPORT RenderFrameHostImpl
62 : public RenderFrameHost, 63 : public RenderFrameHost,
63 public BrowserAccessibilityDelegate { 64 public BrowserAccessibilityDelegate {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // after they are blocked in RenderWidgetHelper::CreateNewWindow. 122 // after they are blocked in RenderWidgetHelper::CreateNewWindow.
122 void Init(); 123 void Init();
123 124
124 int routing_id() const { return routing_id_; } 125 int routing_id() const { return routing_id_; }
125 void OnCreateChildFrame(int new_routing_id, 126 void OnCreateChildFrame(int new_routing_id,
126 const std::string& frame_name); 127 const std::string& frame_name);
127 128
128 RenderViewHostImpl* render_view_host() { return render_view_host_; } 129 RenderViewHostImpl* render_view_host() { return render_view_host_; }
129 RenderFrameHostDelegate* delegate() { return delegate_; } 130 RenderFrameHostDelegate* delegate() { return delegate_; }
130 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } 131 FrameTreeNode* frame_tree_node() { return frame_tree_node_; }
132
133 void CreateRenderWidgetHost(RenderWidgetHostDelegate* delegate,
Charlie Reis 2014/10/01 17:01:08 Please add a comment saying when this should be ca
kenrb 2014/10/01 19:27:51 Done.
134 bool hidden);
131 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in 135 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in
Charlie Reis 2014/10/01 17:01:08 Can we update this comment now?
kenrb 2014/10/01 19:27:51 Done.
132 // the future, so update this accessor to return the right pointer. 136 // the future, so update this accessor to return the right pointer.
133 RenderWidgetHostImpl* GetRenderWidgetHost(); 137 RenderWidgetHostImpl* GetRenderWidgetHost();
134 138
135 // This function is called when this is a swapped out RenderFrameHost that 139 // This function is called when this is a swapped out RenderFrameHost that
136 // lives in the same process as the parent frame. The 140 // lives in the same process as the parent frame. The
137 // |cross_process_frame_connector| allows the non-swapped-out 141 // |cross_process_frame_connector| allows the non-swapped-out
138 // RenderFrameHost for a frame to communicate with the parent process 142 // RenderFrameHost for a frame to communicate with the parent process
139 // so that it may composite drawing data. 143 // so that it may composite drawing data.
140 // 144 //
141 // Ownership is not transfered. 145 // Ownership is not transfered.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. 435 // The FrameTreeNode which this RenderFrameHostImpl is hosted in.
432 FrameTreeNode* frame_tree_node_; 436 FrameTreeNode* frame_tree_node_;
433 437
434 // The mapping of pending JavaScript calls created by 438 // The mapping of pending JavaScript calls created by
435 // ExecuteJavaScript and their corresponding callbacks. 439 // ExecuteJavaScript and their corresponding callbacks.
436 std::map<int, JavaScriptResultCallback> javascript_callbacks_; 440 std::map<int, JavaScriptResultCallback> javascript_callbacks_;
437 441
438 // Map from notification_id to a callback to cancel them. 442 // Map from notification_id to a callback to cancel them.
439 std::map<int, base::Closure> cancel_notification_callbacks_; 443 std::map<int, base::Closure> cancel_notification_callbacks_;
440 444
445 // RenderFrameHosts that need management of the rendering and input events
446 // for their frame subtrees require RenderWidgetHosts. This typically
447 // means main frames and frames that are rendered in different processes from
Charlie Reis 2014/10/01 17:01:08 We don't use this for the main frame, do we? Aren
kenrb 2014/10/01 19:27:51 We will, but not yet. I have changed it accordingl
448 // their parent frames.
449 scoped_ptr<RenderWidgetHostImpl> render_widget_host_impl_;
nasko 2014/10/01 16:37:14 nit: it might be shorter to just drop the "impl_"
kenrb 2014/10/01 19:27:51 Ok.
450
441 int routing_id_; 451 int routing_id_;
442 bool is_swapped_out_; 452 bool is_swapped_out_;
443 bool renderer_initialized_; 453 bool renderer_initialized_;
444 454
445 // Whether we should buffer outgoing Navigate messages rather than sending 455 // Whether we should buffer outgoing Navigate messages rather than sending
446 // them. This will be true when a RenderFrameHost is created for a cross-site 456 // them. This will be true when a RenderFrameHost is created for a cross-site
447 // request, until we hear back from the onbeforeunload handler of the old 457 // request, until we hear back from the onbeforeunload handler of the old
448 // RenderFrameHost. 458 // RenderFrameHost.
449 bool navigations_suspended_; 459 bool navigations_suspended_;
450 460
(...skipping 17 matching lines...) Expand all
468 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; 478 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_;
469 // The most recently received accessibility tree - for testing only. 479 // The most recently received accessibility tree - for testing only.
470 scoped_ptr<ui::AXTree> ax_tree_for_testing_; 480 scoped_ptr<ui::AXTree> ax_tree_for_testing_;
471 481
472 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 482 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
473 }; 483 };
474 484
475 } // namespace content 485 } // namespace content
476 486
477 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 487 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698