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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 class StreamHandle; | 95 class StreamHandle; |
96 class TimeoutMonitor; | 96 class TimeoutMonitor; |
97 class WebBluetoothServiceImpl; | 97 class WebBluetoothServiceImpl; |
98 struct ContentSecurityPolicyHeader; | 98 struct ContentSecurityPolicyHeader; |
99 struct ContextMenuParams; | 99 struct ContextMenuParams; |
100 struct FileChooserParams; | 100 struct FileChooserParams; |
101 struct FrameOwnerProperties; | 101 struct FrameOwnerProperties; |
102 struct FileChooserParams; | 102 struct FileChooserParams; |
103 struct ResourceResponse; | 103 struct ResourceResponse; |
104 | 104 |
| 105 namespace mojom { |
| 106 class CreateNewWindowParams; |
| 107 } |
| 108 |
105 class CONTENT_EXPORT RenderFrameHostImpl | 109 class CONTENT_EXPORT RenderFrameHostImpl |
106 : public RenderFrameHost, | 110 : public RenderFrameHost, |
107 NON_EXPORTED_BASE(public mojom::FrameHost), | 111 NON_EXPORTED_BASE(public mojom::FrameHost), |
108 public BrowserAccessibilityDelegate, | 112 public BrowserAccessibilityDelegate, |
109 public SiteInstanceImpl::Observer, | 113 public SiteInstanceImpl::Observer, |
110 public NON_EXPORTED_BASE( | 114 public NON_EXPORTED_BASE( |
111 service_manager::InterfaceFactory<media::mojom::InterfaceFactory>) { | 115 service_manager::InterfaceFactory<media::mojom::InterfaceFactory>) { |
112 public: | 116 public: |
113 using AXTreeSnapshotCallback = | 117 using AXTreeSnapshotCallback = |
114 base::Callback<void( | 118 base::Callback<void( |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Tracks whether the RenderFrame for this RenderFrameHost has been created in | 211 // Tracks whether the RenderFrame for this RenderFrameHost has been created in |
208 // the renderer process. This is currently only used for subframes. | 212 // the renderer process. This is currently only used for subframes. |
209 // TODO(creis): Use this for main frames as well when RVH goes away. | 213 // TODO(creis): Use this for main frames as well when RVH goes away. |
210 void SetRenderFrameCreated(bool created); | 214 void SetRenderFrameCreated(bool created); |
211 | 215 |
212 // Called for renderer-created windows to resume requests from this frame, | 216 // Called for renderer-created windows to resume requests from this frame, |
213 // after they are blocked in RenderWidgetHelper::CreateNewWindow. | 217 // after they are blocked in RenderWidgetHelper::CreateNewWindow. |
214 void Init(); | 218 void Init(); |
215 | 219 |
216 int routing_id() const { return routing_id_; } | 220 int routing_id() const { return routing_id_; } |
| 221 |
| 222 // Called when this frame has added a child. This is a continuation of an IPC |
| 223 // that was partially handled on the IO thread (to allocate |new_routing_id|), |
| 224 // and is forwarded here. The renderer has already been told to create a |
| 225 // RenderFrame with |new_routing_id|. |
217 void OnCreateChildFrame(int new_routing_id, | 226 void OnCreateChildFrame(int new_routing_id, |
218 blink::WebTreeScopeType scope, | 227 blink::WebTreeScopeType scope, |
219 const std::string& frame_name, | 228 const std::string& frame_name, |
220 const std::string& frame_unique_name, | 229 const std::string& frame_unique_name, |
221 blink::WebSandboxFlags sandbox_flags, | 230 blink::WebSandboxFlags sandbox_flags, |
222 const FrameOwnerProperties& frame_owner_properties); | 231 const FrameOwnerProperties& frame_owner_properties); |
223 | 232 |
| 233 // Called when this frame tries to open a new WebContents, e.g. via a script |
| 234 // call to window.open(). The renderer has already been told to create the |
| 235 // RenderView and RenderFrame with the specified route ids, which were |
| 236 // assigned on the IO thread. |
| 237 void OnCreateNewWindow(int32_t render_view_route_id, |
| 238 int32_t main_frame_route_id, |
| 239 int32_t main_frame_widget_route_id, |
| 240 const mojom::CreateNewWindowParams& params, |
| 241 SessionStorageNamespace* session_storage_namespace); |
| 242 |
224 RenderViewHostImpl* render_view_host() { return render_view_host_; } | 243 RenderViewHostImpl* render_view_host() { return render_view_host_; } |
225 RenderFrameHostDelegate* delegate() { return delegate_; } | 244 RenderFrameHostDelegate* delegate() { return delegate_; } |
226 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } | 245 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
227 | 246 |
228 const GURL& last_committed_url() const { return last_committed_url_; } | 247 const GURL& last_committed_url() const { return last_committed_url_; } |
229 | 248 |
230 // Allows FrameTreeNode::SetCurrentURL to update this frame's last committed | 249 // Allows FrameTreeNode::SetCurrentURL to update this frame's last committed |
231 // URL. Do not call this directly, since we rely on SetCurrentURL to track | 250 // URL. Do not call this directly, since we rely on SetCurrentURL to track |
232 // whether a real load has committed or not. | 251 // whether a real load has committed or not. |
233 void set_last_committed_url(const GURL& url) { | 252 void set_last_committed_url(const GURL& url) { |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 void OnSelectionChanged(const base::string16& text, | 736 void OnSelectionChanged(const base::string16& text, |
718 uint32_t offset, | 737 uint32_t offset, |
719 const gfx::Range& range); | 738 const gfx::Range& range); |
720 void OnFocusedNodeChanged(bool is_editable_element, | 739 void OnFocusedNodeChanged(bool is_editable_element, |
721 const gfx::Rect& bounds_in_frame_widget); | 740 const gfx::Rect& bounds_in_frame_widget); |
722 | 741 |
723 #if defined(USE_EXTERNAL_POPUP_MENU) | 742 #if defined(USE_EXTERNAL_POPUP_MENU) |
724 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 743 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
725 void OnHidePopup(); | 744 void OnHidePopup(); |
726 #endif | 745 #endif |
| 746 void OnShowCreatedWindow(int pending_widget_routing_id, |
| 747 WindowOpenDisposition disposition, |
| 748 const gfx::Rect& initial_rect, |
| 749 bool user_gesture); |
727 | 750 |
728 // Registers Mojo interfaces that this frame host makes available. | 751 // Registers Mojo interfaces that this frame host makes available. |
729 void RegisterMojoInterfaces(); | 752 void RegisterMojoInterfaces(); |
730 | 753 |
731 // Resets any waiting state of this RenderFrameHost that is no longer | 754 // Resets any waiting state of this RenderFrameHost that is no longer |
732 // relevant. | 755 // relevant. |
733 void ResetWaitingState(); | 756 void ResetWaitingState(); |
734 | 757 |
735 // Returns whether the given URL is allowed to commit in the current process. | 758 // Returns whether the given URL is allowed to commit in the current process. |
736 // This is a more conservative check than RenderProcessHost::FilterURL, since | 759 // This is a more conservative check than RenderProcessHost::FilterURL, since |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 | 1129 |
1107 // NOTE: This must be the last member. | 1130 // NOTE: This must be the last member. |
1108 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1131 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1109 | 1132 |
1110 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1133 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1111 }; | 1134 }; |
1112 | 1135 |
1113 } // namespace content | 1136 } // namespace content |
1114 | 1137 |
1115 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1138 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |