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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // should be the abstraction needed here, but we need RenderViewHost to pass | 90 // should be the abstraction needed here, but we need RenderViewHost to pass |
91 // into WebContentsObserver::FrameDetached for now. | 91 // into WebContentsObserver::FrameDetached for now. |
92 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, | 92 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, |
93 RenderFrameHostDelegate* delegate, | 93 RenderFrameHostDelegate* delegate, |
94 FrameTree* frame_tree, | 94 FrameTree* frame_tree, |
95 FrameTreeNode* frame_tree_node, | 95 FrameTreeNode* frame_tree_node, |
96 int routing_id, | 96 int routing_id, |
97 bool is_swapped_out); | 97 bool is_swapped_out); |
98 | 98 |
99 private: | 99 private: |
| 100 friend class TestRenderFrameHost; |
100 friend class TestRenderViewHost; | 101 friend class TestRenderViewHost; |
101 | 102 |
102 // IPC Message handlers. | 103 // IPC Message handlers. |
103 void OnDetach(int64 parent_frame_id, int64 frame_id); | 104 void OnDetach(int64 parent_frame_id, int64 frame_id); |
104 void OnDidStartProvisionalLoadForFrame(int64 frame_id, | 105 void OnDidStartProvisionalLoadForFrame(int64 frame_id, |
105 int64 parent_frame_id, | 106 int64 parent_frame_id, |
106 bool main_frame, | 107 bool main_frame, |
107 const GURL& url); | 108 const GURL& url); |
108 void OnDidFailProvisionalLoadWithError( | 109 void OnDidFailProvisionalLoadWithError( |
109 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); | 110 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); |
110 void OnDidRedirectProvisionalLoad(int32 page_id, | 111 void OnDidRedirectProvisionalLoad(int32 page_id, |
111 const GURL& source_url, | 112 const GURL& source_url, |
112 const GURL& target_url); | 113 const GURL& target_url); |
| 114 void OnNavigate(const IPC::Message& msg); |
113 void OnSwapOutACK(); | 115 void OnSwapOutACK(); |
114 void OnContextMenu(const ContextMenuParams& params); | 116 void OnContextMenu(const ContextMenuParams& params); |
115 | 117 |
| 118 // Returns whether the given URL is allowed to commit in the current process. |
| 119 // This is a more conservative check than RenderProcessHost::FilterURL, since |
| 120 // it will be used to kill processes that commit unauthorized URLs. |
| 121 bool CanCommitURL(const GURL& url); |
| 122 |
116 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 123 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
117 // refcount that calls Shutdown when it reaches zero. This allows each | 124 // refcount that calls Shutdown when it reaches zero. This allows each |
118 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 125 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
119 // we have a RenderViewHost for each RenderFrameHost. | 126 // we have a RenderViewHost for each RenderFrameHost. |
120 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 127 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
121 // some form of page context. | 128 // some form of page context. |
122 RenderViewHostImpl* render_view_host_; | 129 RenderViewHostImpl* render_view_host_; |
123 | 130 |
124 RenderFrameHostDelegate* delegate_; | 131 RenderFrameHostDelegate* delegate_; |
125 | 132 |
(...skipping 19 matching lines...) Expand all Loading... |
145 | 152 |
146 int routing_id_; | 153 int routing_id_; |
147 bool is_swapped_out_; | 154 bool is_swapped_out_; |
148 | 155 |
149 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 156 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
150 }; | 157 }; |
151 | 158 |
152 } // namespace content | 159 } // namespace content |
153 | 160 |
154 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 161 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |