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