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/renderer/render_view_impl.h

Issue 9108001: Adds support for calling postMessage on a frame living in a different renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use FromRoutingID Created 8 years, 7 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
Index: content/renderer/render_view_impl.h
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 8e5522a2db4342d4d1409dee4717c2177cebe7bd..d2210a8427935cfb413a747f317bdc3a3ed3a7e6 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -43,6 +43,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
@@ -80,6 +81,7 @@ class RendererAccessibility;
class RendererWebColorChooserImpl;
class SkBitmap;
class InputTagSpeechDispatcher;
+struct ViewHostMsg_PostMessage_Params;
struct ViewMsg_Navigate_Params;
struct ViewMsg_StopFinding_Params;
struct ViewMsg_SwapOut_Params;
@@ -120,6 +122,7 @@ class ResourceFetcher;
namespace WebKit {
class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
+class WebDOMMessageEvent;
class WebDataSource;
class WebDragData;
class WebGeolocationClient;
@@ -203,6 +206,9 @@ class RenderViewImpl : public RenderWidget,
// Returns the RenderViewImpl containing the given WebView.
CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview);
+ // Returns the RenderViewImpl with the given routing ID, or NULL.
+ static RenderViewImpl* FromRoutingID(int32 routing_id);
jam 2012/05/14 06:41:45 nit: it seems best to avoid exposing this outside
Charlie Reis 2012/05/14 17:38:43 Made it a static helper function in render_view_im
+
// May return NULL when the view is closing.
CONTENT_EXPORT WebKit::WebView* webview() const;
@@ -596,6 +602,11 @@ class RenderViewImpl : public RenderWidget,
virtual void willOpenSocketStream(
WebKit::WebSocketStreamHandle* handle);
jam 2012/05/14 06:41:45 nit: no blank line
Charlie Reis 2012/05/14 17:38:43 Done.
+ virtual bool willCheckAndDispatchMessageEvent(
+ WebKit::WebFrame* source,
+ WebKit::WebSecurityOrigin targetOrigin,
+ WebKit::WebDOMMessageEvent event) OVERRIDE;
+
// WebKit::WebPageSerializerClient implementation ----------------------------
virtual void didSerializeDataForFrame(
@@ -872,6 +883,7 @@ class RenderViewImpl : public RenderWidget,
#if defined(OS_MACOSX)
void OnPluginImeCompositionCompleted(const string16& text, int plugin_id);
#endif
+ void OnPostMessageEvent(const ViewHostMsg_PostMessage_Params& params);
void OnRedo();
void OnReloadFrame();
void OnReplace(const string16& text);

Powered by Google App Engine
This is Rietveld 408576698