| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // context. | 167 // context. |
| 168 virtual const GURL& GetLastCommittedURL() const = 0; | 168 virtual const GURL& GetLastCommittedURL() const = 0; |
| 169 | 169 |
| 170 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 170 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
| 171 // these may change over time. | 171 // these may change over time. |
| 172 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 172 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
| 173 | 173 |
| 174 // Returns the main frame for the currently active view. | 174 // Returns the main frame for the currently active view. |
| 175 virtual RenderFrameHost* GetMainFrame() = 0; | 175 virtual RenderFrameHost* GetMainFrame() = 0; |
| 176 | 176 |
| 177 // Returns the focused frame for the currently active view. |
| 178 virtual RenderFrameHost* GetFocusedFrame() = 0; |
| 179 |
| 177 // Calls |on_frame| for each frame in the currently active view. | 180 // Calls |on_frame| for each frame in the currently active view. |
| 178 virtual void ForEachFrame( | 181 virtual void ForEachFrame( |
| 179 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | 182 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; |
| 180 | 183 |
| 181 // Sends the given IPC to all frames in the currently active view. This is a | 184 // Sends the given IPC to all frames in the currently active view. This is a |
| 182 // convenience method instead of calling ForEach. | 185 // convenience method instead of calling ForEach. |
| 183 virtual void SendToAllFrames(IPC::Message* message) = 0; | 186 virtual void SendToAllFrames(IPC::Message* message) = 0; |
| 184 | 187 |
| 185 // Gets the current RenderViewHost for this tab. | 188 // Gets the current RenderViewHost for this tab. |
| 186 virtual RenderViewHost* GetRenderViewHost() const = 0; | 189 virtual RenderViewHost* GetRenderViewHost() const = 0; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 503 |
| 501 private: | 504 private: |
| 502 // This interface should only be implemented inside content. | 505 // This interface should only be implemented inside content. |
| 503 friend class WebContentsImpl; | 506 friend class WebContentsImpl; |
| 504 WebContents() {} | 507 WebContents() {} |
| 505 }; | 508 }; |
| 506 | 509 |
| 507 } // namespace content | 510 } // namespace content |
| 508 | 511 |
| 509 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 512 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |