summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-23 18:43:35 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-23 18:43:35 +0000
commit157e5d2a82b6b81e2f1e38202f7c6c2a6d888794 (patch)
tree8220dba701eeddf2c342c3d229776c6d55c0649d /chrome/common
parent4af6c48ec0e1d4c81a5f68a0bd78c125730d4e96 (diff)
downloadchromium_src-157e5d2a82b6b81e2f1e38202f7c6c2a6d888794.zip
chromium_src-157e5d2a82b6b81e2f1e38202f7c6c2a6d888794.tar.gz
chromium_src-157e5d2a82b6b81e2f1e38202f7c6c2a6d888794.tar.bz2
linux (and some posix): multiprocess plugins compiling.
The goal of this change is to *not* make any behavioral change, but to instead just get all the plugin-related files linking on Linux with a bunch of NOTIMPLEMENTED()s in the appropriate places. It's enormous enough already without any refactorings or new features. Changes include: - Lots of gcc warning fixes. - Use portable replacements for Windows-specific functions (_strdup, etc.). - Use TransportDIB instead of just shared memory in the plugin messaging. Note that this is not fleshed out on Linux and on Windows it just hacks in the existing handles so there should be no functional change. - Fix --plugin-launcher to use cross-platform APIs. Review URL: http://codereview.chromium.org/79020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/child_process_host.h2
-rw-r--r--chrome/common/ipc_channel.h2
-rw-r--r--chrome/common/ipc_channel_posix.cc4
-rw-r--r--chrome/common/ipc_channel_posix.h2
-rw-r--r--chrome/common/ipc_channel_proxy.cc3
-rw-r--r--chrome/common/ipc_channel_proxy.h2
-rw-r--r--chrome/common/plugin_messages_internal.h4
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc4
-rw-r--r--chrome/common/transport_dib.h3
9 files changed, 17 insertions, 9 deletions
diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h
index d4d2dd9..5a49a44 100644
--- a/chrome/common/child_process_host.h
+++ b/chrome/common/child_process_host.h
@@ -74,6 +74,8 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver,
bool opening_channel() { return opening_channel_; }
const std::wstring& channel_id() { return channel_id_; }
+ const IPC::Channel& channel() const { return *channel_; }
+
private:
// Sends the given notification to the notification service on the UI thread.
void Notify(NotificationType type);
diff --git a/chrome/common/ipc_channel.h b/chrome/common/ipc_channel.h
index 9b7f8b2..dabfe1a 100644
--- a/chrome/common/ipc_channel.h
+++ b/chrome/common/ipc_channel.h
@@ -94,7 +94,7 @@ class Channel : public Message::Sender {
// If the kTestingChannelID flag is specified on the command line then
// a named FIFO is used as the channel transport mechanism rather than a
// socketpair() in which case this method returns -1 for both parameters.
- void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd);
+ void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
// Call this method on the server side of the IPC Channel once a client is
// connected in order to close the client side of the socketpair().
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc
index 71a1f44..83f1ed4 100644
--- a/chrome/common/ipc_channel_posix.cc
+++ b/chrome/common/ipc_channel_posix.cc
@@ -658,7 +658,7 @@ bool Channel::ChannelImpl::Send(Message* message) {
}
void Channel::ChannelImpl::GetClientFileDescriptorMapping(int *src_fd,
- int *dest_fd) {
+ int *dest_fd) const {
DCHECK(mode_ == MODE_SERVER);
*src_fd = client_pipe_;
*dest_fd = kClientChannelFd;
@@ -792,7 +792,7 @@ bool Channel::Send(Message* message) {
return channel_impl_->Send(message);
}
-void Channel::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) {
+void Channel::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const {
return channel_impl_->GetClientFileDescriptorMapping(src_fd, dest_fd);
}
diff --git a/chrome/common/ipc_channel_posix.h b/chrome/common/ipc_channel_posix.h
index fbdd59b..f94b171 100644
--- a/chrome/common/ipc_channel_posix.h
+++ b/chrome/common/ipc_channel_posix.h
@@ -27,7 +27,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
void Close();
void set_listener(Listener* listener) { listener_ = listener; }
bool Send(Message* message);
- void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd);
+ void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
void OnClientConnected();
private:
diff --git a/chrome/common/ipc_channel_proxy.cc b/chrome/common/ipc_channel_proxy.cc
index a9def01..47aa89b 100644
--- a/chrome/common/ipc_channel_proxy.cc
+++ b/chrome/common/ipc_channel_proxy.cc
@@ -286,7 +286,8 @@ void ChannelProxy::RemoveFilter(MessageFilter* filter) {
// See the TODO regarding lazy initialization of the channel in
// ChannelProxy::Init().
// We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe.
-void ChannelProxy::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) {
+void ChannelProxy::GetClientFileDescriptorMapping(int *src_fd,
+ int *dest_fd) const {
Channel *channel = context_.get()->channel_;
DCHECK(channel); // Channel must have been created first.
channel->GetClientFileDescriptorMapping(src_fd, dest_fd);
diff --git a/chrome/common/ipc_channel_proxy.h b/chrome/common/ipc_channel_proxy.h
index 80a9807..2263ea6 100644
--- a/chrome/common/ipc_channel_proxy.h
+++ b/chrome/common/ipc_channel_proxy.h
@@ -117,7 +117,7 @@ class ChannelProxy : public Message::Sender {
// Calls through to the underlying channel's methods.
// TODO(playmobil): For now this is only implemented in the case of
// create_pipe_now = true, we need to figure this out for the latter case.
- void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd);
+ void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
void OnClientConnected();
#endif // defined(OS_POSIX)
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index 54839fb..ed2e219 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -143,8 +143,8 @@ IPC_BEGIN_MESSAGES(Plugin)
IPC_MESSAGE_ROUTED4(PluginMsg_UpdateGeometry,
gfx::Rect /* window_rect */,
gfx::Rect /* clip_rect */,
- base::SharedMemoryHandle /* windowless_buffer */,
- base::SharedMemoryHandle /* background_buffer */)
+ TransportDIB::Id /* windowless_buffer */,
+ TransportDIB::Id /* background_buffer */)
IPC_SYNC_MESSAGE_ROUTED0_0(PluginMsg_SetFocus)
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 4dcb220..e8c76be 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -200,10 +200,12 @@ bool RLZTracker::RecordProductEvent(Product product, AccessPoint point,
return false;
}
+#if defined(OS_MACOSX)
// This depends on porting all the plugin IPC messages.
bool IsPluginProcess() {
return false;
}
+#endif
//--------------------------------------------------------------------------
@@ -244,10 +246,12 @@ void ProcessWatcher::EnsureProcessTerminated(int) {
//--------------------------------------------------------------------------
namespace webkit_glue {
+#if defined(OS_MACOSX)
bool IsDefaultPluginEnabled() {
NOTIMPLEMENTED();
return false;
}
+#endif
} // webkit_glue
diff --git a/chrome/common/transport_dib.h b/chrome/common/transport_dib.h
index 8f5be3a..e20dd5c 100644
--- a/chrome/common/transport_dib.h
+++ b/chrome/common/transport_dib.h
@@ -23,7 +23,8 @@ class Size;
// -----------------------------------------------------------------------------
// A TransportDIB is a block of memory that is used to transport pixels
-// from the renderer process to the browser.
+// between processes: from the renderer process to the browser, and
+// between renderer and plugin processes.
// -----------------------------------------------------------------------------
class TransportDIB {
public: