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

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

Issue 1314133005: Revert of Remove RenderFrameMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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_message_filter.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_message_filter.h
diff --git a/content/browser/frame_host/render_frame_message_filter.h b/content/browser/frame_host/render_frame_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..e60343acbb7615fd4e89eec3e2d81bcd4fcf2f55
--- /dev/null
+++ b/content/browser/frame_host/render_frame_message_filter.h
@@ -0,0 +1,45 @@
+// Copyright 2013 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_BROWSER_FRAME_HOST_RENDER_FRAME_MESSAGE_FILTER_H_
+#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_MESSAGE_FILTER_H_
+
+#include "content/common/frame_replication_state.h"
+#include "content/public/browser/browser_message_filter.h"
+#include "third_party/WebKit/public/web/WebTreeScopeType.h"
+
+namespace content {
+class RenderWidgetHelper;
+
+// RenderFrameMessageFilter intercepts FrameHost messages on the IO thread
+// that require low-latency processing. The canonical example of this is
+// child-frame creation which is a sync IPC that provides the renderer
+// with the routing id for a newly created RenderFrame.
+//
+// This object is created on the UI thread and used on the IO thread.
+class RenderFrameMessageFilter : public BrowserMessageFilter {
+ public:
+ RenderFrameMessageFilter(int render_process_id,
+ RenderWidgetHelper* render_widget_helper);
+
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ private:
+ ~RenderFrameMessageFilter() override;
+
+ void OnCreateChildFrame(int parent_routing_id,
+ blink::WebTreeScopeType scope,
+ const std::string& frame_name,
+ blink::WebSandboxFlags sandbox_flags,
+ int* new_render_frame_id);
+
+ const int render_process_id_;
+
+ // Needed for issuing routing ids and surface ids.
+ scoped_refptr<RenderWidgetHelper> render_widget_helper_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_MESSAGE_FILTER_H_
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698