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

Unified Diff: content/browser/frame_host/render_frame_host_delegate.h

Issue 1046933005: Refactor postMessage for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's nits Created 5 years, 8 months 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_delegate.h
diff --git a/content/browser/frame_host/render_frame_host_delegate.h b/content/browser/frame_host/render_frame_host_delegate.h
index 56b563474e07c071f2f250fbf98e4b150b82258f..f0e9fbd51d546d0cd7e394a639ad6a0a77cd1722 100644
--- a/content/browser/frame_host/render_frame_host_delegate.h
+++ b/content/browser/frame_host/render_frame_host_delegate.h
@@ -11,6 +11,7 @@
#include "base/i18n/rtl.h"
#include "content/common/content_export.h"
#include "content/common/frame_message_enums.h"
+#include "content/public/browser/site_instance.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/media_stream_request.h"
#include "net/http/http_response_headers.h"
@@ -168,6 +169,26 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
// Notification that the frame wants to go out of fullscreen mode.
virtual void ExitFullscreenMode() {}
+ // Let the delegate decide whether postMessage should be delivered to
+ // |target_rfh| from a source frame in the given SiteInstance. This defaults
+ // to false and overrides the RenderFrameHost's decision if true.
+ virtual bool ShouldRouteMessageEvent(
+ RenderFrameHost* target_rfh,
+ SiteInstance* source_site_instance) const;
+
+ // Ensure that |source_rfh| has swapped-out RenderViews and proxies for
+ // itself and for each frame on its opener chain in the current frame's
+ // SiteInstance. Returns the routing ID of the swapped-out RenderView
+ // corresponding to |source_rfh|.
+ //
+ // TODO(alexmos): This method will be removed once opener tracking and
+ // CreateOpenerRenderViews moves out of WebContents and into lower layers, as
+ // part of https://crbug.com/225940. Currently, this method temporarily
+ // supports cross-process postMessage in non-site-per-process mode, where we
+ // need to create any missing proxies for the message's source frame and its
+ // opener chain on demand.
+ virtual int EnsureOpenerRenderViewsExist(RenderFrameHost* source_rfh);
+
#if defined(OS_WIN)
// Returns the frame's parent's NativeViewAccessible.
virtual gfx::NativeViewAccessible GetParentNativeViewAccessible();
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698