Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: content/public/browser/web_contents.h

Issue 104833006: Switch ContentSettingsObserver to be a RenderFrameObserver instead of a RenderViewObserver (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/web_contents.h
===================================================================
--- content/public/browser/web_contents.h (revision 240912)
+++ content/public/browser/web_contents.h (working copy)
@@ -127,6 +127,8 @@
CONTENT_EXPORT static WebContents* FromRenderViewHost(
const RenderViewHost* rvh);
+ CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh);
+
virtual ~WebContents() {}
// Intrinsic tab state -------------------------------------------------------
@@ -167,6 +169,14 @@
// Returns the main frame for the currently active view.
virtual RenderFrameHost* GetMainFrame() = 0;
+ // Calls |on_frame| for each frame in the currently active view.
+ virtual void ForEachFrame(
+ const base::Callback<void(RenderFrameHost*)>& on_frame) = 0;
+
+ // Sends the given IPC to all frames in the currently active view. This is a
+ // convenience method instead of calling ForEach.
+ virtual void SendToAllFrames(IPC::Message* message) = 0;
+
// Gets the current RenderViewHost for this tab.
virtual RenderViewHost* GetRenderViewHost() const = 0;

Powered by Google App Engine
This is Rietveld 408576698