| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 int frame_tree_node_id) = 0; | 221 int frame_tree_node_id) = 0; |
| 222 | 222 |
| 223 // Calls |on_frame| for each frame in the currently active view. | 223 // Calls |on_frame| for each frame in the currently active view. |
| 224 // Note: The RenderFrameHost parameter is not guaranteed to have a live | 224 // Note: The RenderFrameHost parameter is not guaranteed to have a live |
| 225 // RenderFrame counterpart in the renderer process. Callbacks should check | 225 // RenderFrame counterpart in the renderer process. Callbacks should check |
| 226 // 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 |
| 227 // silently. | 227 // silently. |
| 228 virtual void ForEachFrame( | 228 virtual void ForEachFrame( |
| 229 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | 229 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; |
| 230 | 230 |
| 231 // Returns a vector of all RenderFrameHosts in the currently active view in |
| 232 // breadth-first traversal order. |
| 233 virtual std::vector<RenderFrameHost*> FrameHosts() = 0; |
| 234 |
| 231 // Sends the given IPC to all frames in the currently active view and returns | 235 // Sends the given IPC to all frames in the currently active view and returns |
| 232 // the number of sent messages (i.e. the number of processed frames). This is | 236 // the number of sent messages (i.e. the number of processed frames). This is |
| 233 // a convenience method instead of calling ForEach. | 237 // a convenience method instead of calling ForEach. |
| 234 virtual int SendToAllFrames(IPC::Message* message) = 0; | 238 virtual int SendToAllFrames(IPC::Message* message) = 0; |
| 235 | 239 |
| 236 // Gets the current RenderViewHost for this tab. | 240 // Gets the current RenderViewHost for this tab. |
| 237 virtual RenderViewHost* GetRenderViewHost() const = 0; | 241 virtual RenderViewHost* GetRenderViewHost() const = 0; |
| 238 | 242 |
| 239 // Gets the current RenderViewHost's routing id. Returns | 243 // Gets the current RenderViewHost's routing id. Returns |
| 240 // MSG_ROUTING_NONE when there is no RenderViewHost. | 244 // MSG_ROUTING_NONE when there is no RenderViewHost. |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 | 714 |
| 711 private: | 715 private: |
| 712 // This interface should only be implemented inside content. | 716 // This interface should only be implemented inside content. |
| 713 friend class WebContentsImpl; | 717 friend class WebContentsImpl; |
| 714 WebContents() {} | 718 WebContents() {} |
| 715 }; | 719 }; |
| 716 | 720 |
| 717 } // namespace content | 721 } // namespace content |
| 718 | 722 |
| 719 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 723 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |