OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 207 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
208 // these may change over time. | 208 // these may change over time. |
209 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 209 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
210 | 210 |
211 // Returns the main frame for the currently active view. | 211 // Returns the main frame for the currently active view. |
212 virtual RenderFrameHost* GetMainFrame() = 0; | 212 virtual RenderFrameHost* GetMainFrame() = 0; |
213 | 213 |
214 // Returns the focused frame for the currently active view. | 214 // Returns the focused frame for the currently active view. |
215 virtual RenderFrameHost* GetFocusedFrame() = 0; | 215 virtual RenderFrameHost* GetFocusedFrame() = 0; |
216 | 216 |
| 217 // Returns the current RenderFrameHost for a given FrameTreeNode ID if it is |
| 218 // part of this tab. See RenderFrameHost::GetFrameTreeNodeId for documentation |
| 219 // on this ID. |
| 220 virtual RenderFrameHost* FindFrameByFrameTreeNodeId( |
| 221 int frame_tree_node_id) = 0; |
| 222 |
217 // Calls |on_frame| for each frame in the currently active view. | 223 // Calls |on_frame| for each frame in the currently active view. |
218 // Note: The RenderFrameHost parameter is not guaranteed to have a live | 224 // Note: The RenderFrameHost parameter is not guaranteed to have a live |
219 // RenderFrame counterpart in the renderer process. Callbacks should check | 225 // RenderFrame counterpart in the renderer process. Callbacks should check |
220 // IsRenderFrameLive, as sending IPC messages to it in this case will fail | 226 // IsRenderFrameLive, as sending IPC messages to it in this case will fail |
221 // silently. | 227 // silently. |
222 virtual void ForEachFrame( | 228 virtual void ForEachFrame( |
223 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | 229 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; |
224 | 230 |
225 // Sends the given IPC to all frames in the currently active view. This is a | 231 // Sends the given IPC to all frames in the currently active view. This is a |
226 // convenience method instead of calling ForEach. | 232 // convenience method instead of calling ForEach. |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 707 |
702 private: | 708 private: |
703 // This interface should only be implemented inside content. | 709 // This interface should only be implemented inside content. |
704 friend class WebContentsImpl; | 710 friend class WebContentsImpl; |
705 WebContents() {} | 711 WebContents() {} |
706 }; | 712 }; |
707 | 713 |
708 } // namespace content | 714 } // namespace content |
709 | 715 |
710 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 716 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |