| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // context. | 179 // context. |
| 180 virtual const GURL& GetLastCommittedURL() const = 0; | 180 virtual const GURL& GetLastCommittedURL() const = 0; |
| 181 | 181 |
| 182 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 182 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
| 183 // these may change over time. | 183 // these may change over time. |
| 184 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 184 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
| 185 | 185 |
| 186 // Returns the main frame for the currently active view. | 186 // Returns the main frame for the currently active view. |
| 187 virtual RenderFrameHost* GetMainFrame() = 0; | 187 virtual RenderFrameHost* GetMainFrame() = 0; |
| 188 | 188 |
| 189 // Sets the window name of the main frame. |
| 190 virtual void SetMainFrameName(const std::string& name) = 0; |
| 191 |
| 189 // Returns the focused frame for the currently active view. | 192 // Returns the focused frame for the currently active view. |
| 190 virtual RenderFrameHost* GetFocusedFrame() = 0; | 193 virtual RenderFrameHost* GetFocusedFrame() = 0; |
| 191 | 194 |
| 192 // Calls |on_frame| for each frame in the currently active view. | 195 // Calls |on_frame| for each frame in the currently active view. |
| 193 virtual void ForEachFrame( | 196 virtual void ForEachFrame( |
| 194 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; | 197 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; |
| 195 | 198 |
| 196 // Sends the given IPC to all frames in the currently active view. This is a | 199 // Sends the given IPC to all frames in the currently active view. This is a |
| 197 // convenience method instead of calling ForEach. | 200 // convenience method instead of calling ForEach. |
| 198 virtual void SendToAllFrames(IPC::Message* message) = 0; | 201 virtual void SendToAllFrames(IPC::Message* message) = 0; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 605 |
| 603 private: | 606 private: |
| 604 // This interface should only be implemented inside content. | 607 // This interface should only be implemented inside content. |
| 605 friend class WebContentsImpl; | 608 friend class WebContentsImpl; |
| 606 WebContents() {} | 609 WebContents() {} |
| 607 }; | 610 }; |
| 608 | 611 |
| 609 } // namespace content | 612 } // namespace content |
| 610 | 613 |
| 611 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 614 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |