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

Unified Diff: content/common/child_process_host.h

Issue 8229039: Make shared memory allocation possible for all child process types. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « content/browser/renderer_host/render_message_filter.cc ('k') | content/common/child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host.h
===================================================================
--- content/common/child_process_host.h (revision 105562)
+++ content/common/child_process_host.h (working copy)
@@ -19,6 +19,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
+#include "base/shared_memory.h"
#include "base/string16.h"
#include "content/common/content_export.h"
#include "content/common/content_notification_types.h"
@@ -100,6 +101,11 @@
// Adds an IPC message filter. A reference will be kept to the filter.
void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
+ // Public and static for reuse by RenderMessageFilter.
+ static void OnAllocateSharedMemory(
+ uint32 buffer_size, base::ProcessHandle child_process,
+ base::SharedMemoryHandle* handle);
+
protected:
ChildProcessHost();
@@ -146,6 +152,7 @@
class ListenerHook : public IPC::Channel::Listener {
public:
explicit ListenerHook(ChildProcessHost* host);
+ virtual ~ListenerHook();
void Shutdown();
@@ -153,8 +160,15 @@
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
+
+ bool Send(IPC::Message* message);
+
private:
+ void OnShutdownRequest();
+ void OnAllocateSharedMemory(uint32 buffer_size,
+ base::SharedMemoryHandle* handle);
ChildProcessHost* host_;
+ base::ProcessHandle peer_handle_;
DISALLOW_COPY_AND_ASSIGN(ListenerHook);
};
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/common/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698