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