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

Unified Diff: content/renderer/proxy_view_host.h

Issue 8760024: Cross-process postMessage (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: New patch, still not quite done Created 9 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/renderer/proxy_view_host.h
diff --git a/content/renderer/proxy_view_host.h b/content/renderer/proxy_view_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ab92a909c6e1c9d5b5ce2ae3b65d572b6b59a27
--- /dev/null
+++ b/content/renderer/proxy_view_host.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_PROXY_VIEW_HOST_H_
+#define CONTENT_RENDERER_PROXY_VIEW_HOST_H_
+
+#include "content/public/renderer/render_view_observer.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
+
+namespace WebKit {
+class WebView;
+class WebSecurityOrigin;
+class WebDOMMessageEvent;
+}
+
+using WebKit::WebDOMMessageEvent;
+using WebKit::WebFrame;
+using WebKit::WebSecurityOrigin;
+using WebKit::WebView;
+
+namespace content {
+
+class ProxyViewHost : public WebKit::WebViewClient,
Charlie Reis 2011/12/12 22:20:36 Let's add comments for this class to explain what
supersat 2011/12/15 19:30:49 I'm probably just going to migrate over to creatin
+ public WebKit::WebFrameClient,
+ // The render view observer is for the owner RV
+ public RenderViewObserver {
+ public:
+ ProxyViewHost(RenderView* owner, int64 opener_browsing_instance_frame_id);
+ virtual ~ProxyViewHost();
+
+ WebFrame* mainFrame();
+
+ // WebFrameClient methods
+ virtual bool interceptPostMessage(int64 frame_id,
+ WebSecurityOrigin target,
+ WebDOMMessageEvent event);
+
+ // RenderViewObserver methods
+ virtual void Navigate(const GURL& url);
+ virtual void ClosePage();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ProxyViewHost);
+ int64 opener_browsing_instance_frame_id_;
+ WebView* webview_;
+};
+
+} // namespace content
+#endif // CONTENT_RENDERER_PROXY_VIEW_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698