Move child-common classes to content/common_child

We need a place to put code that is shared between child processes of different
types but not used in the browser process. For instance, the NPObject bindings
code is used in the plugin and renderer processes but depends on WebBindings
which the browser shouldn't depend on. Some web platform features require shared
code between renderer and worker processe. The WebKit image decoders are used
by worker, renderer and utility processes.

This creates a content/common_child directory for code shared by more than one
child process type. content/common_child can depend on content/common and all
content/ subdirs except for content/browser and content/common can depend on it.

The java bridge code is (more than a) bit busted since it pulls the NPObject
bindings in to the browser, but since this code is only intended for use on
android single-process configurations I've just created DEPS exceptions for
this bit of code.

BUG=241606

Review URL: https://chromiumcodereview.appspot.com/15047014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201252 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/common/plugin_process_messages.h b/content/common/plugin_process_messages.h
new file mode 100644
index 0000000..6e6ec8a
--- /dev/null
+++ b/content/common/plugin_process_messages.h
@@ -0,0 +1,99 @@
+// Copyright (c) 2012 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.
+//
+// Multiply-included message file, hence no include guard.
+
+#include "build/build_config.h"
+#include "content/common/content_export.h"
+#include "content/common/content_param_traits.h"
+#include "content/public/common/common_param_traits.h"
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_message_macros.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/rect.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+
+#define IPC_MESSAGE_START PluginProcessMsgStart
+
+//-----------------------------------------------------------------------------
+// PluginProcess messages
+// These are messages sent from the browser to the plugin process.
+// Tells the plugin process to create a new channel for communication with a
+// given renderer.  The channel name is returned in a
+// PluginProcessHostMsg_ChannelCreated message.  The renderer ID is passed so
+// that the plugin process reuses an existing channel to that process if it
+// exists. This ID is a unique opaque identifier generated by the browser
+// process.
+IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel,
+                     int /* renderer_id */,
+                     bool /* off_the_record */)
+
+// Tells the plugin process to notify every connected renderer of the pending
+// shutdown, so we don't mistake it for a crash.
+IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown)
+
+IPC_MESSAGE_CONTROL3(PluginProcessMsg_ClearSiteData,
+                     std::string /* site */,
+                     uint64 /* flags */,
+                     uint64 /* max_age */)
+
+
+//-----------------------------------------------------------------------------
+// PluginProcessHost messages
+// These are messages sent from the plugin process to the browser process.
+// Response to a PluginProcessMsg_CreateChannel message.
+IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated,
+                     IPC::ChannelHandle /* channel_handle */)
+
+IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ClearSiteDataResult,
+                     bool /* success */)
+
+#if defined(OS_WIN)
+// Destroys the given window's parent on the UI thread.
+IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed,
+                     HWND /* window */,
+                     HWND /* parent */)
+#endif
+
+#if defined(USE_X11)
+// On X11, the mapping between NativeViewId and X window ids
+// is known only to the browser.  This message lets the plugin process
+// ask about a NativeViewId that was provided by the renderer.
+// It will get 0 back if it's a bogus input.
+IPC_SYNC_MESSAGE_CONTROL1_1(PluginProcessHostMsg_MapNativeViewId,
+                           gfx::NativeViewId /* input: native view id */,
+                           gfx::PluginWindowHandle /* output: X window id */)
+#endif
+
+#if defined(OS_MACOSX)
+// On Mac OS X, we need the browser to keep track of plugin windows so
+// that it can add and remove them from stacking groups, hide and show the
+// menu bar, etc.  We pass the window rect for convenience so that the
+// browser can easily tell if the window is fullscreen.
+
+// Notifies the browser that the plugin has selected a window (i.e., brought
+// it to the front and wants it to have keyboard focus).
+IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginSelectWindow,
+                     uint32 /* window ID */,
+                     gfx::Rect /* window rect */,
+                     bool /* modal */)
+
+// Notifies the browser that the plugin has shown a window.
+IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow,
+                     uint32 /* window ID */,
+                     gfx::Rect /* window rect */,
+                     bool /* modal */)
+
+// Notifies the browser that the plugin has hidden a window.
+IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow,
+                     uint32 /* window ID */,
+                     gfx::Rect /* window rect */)
+
+// Notifies the browser that a plugin instance has requested a cursor
+// visibility change.
+IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginSetCursorVisibility,
+                     bool /* cursor visibility */)
+#endif