summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 20:56:46 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 20:56:46 +0000
commit24c62dc78b5f53498de7962b4da83f7f4de50259 (patch)
treeb9a5dc732659cada99a8e2d7f652749dbc583e6b /chrome/plugin
parent255a9f6c6f6db2a95fec78c6c2f2c504c655e733 (diff)
downloadchromium_src-24c62dc78b5f53498de7962b4da83f7f4de50259.zip
chromium_src-24c62dc78b5f53498de7962b4da83f7f4de50259.tar.gz
chromium_src-24c62dc78b5f53498de7962b4da83f7f4de50259.tar.bz2
Revert "posix: two related changes to make plugin IPC work on POSIX."
This reverts commit r18850, as it had a compile failure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_channel.cc14
-rw-r--r--chrome/plugin/plugin_channel.h8
-rw-r--r--chrome/plugin/plugin_thread.cc13
-rw-r--r--chrome/plugin/plugin_thread.h14
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc6
5 files changed, 9 insertions, 46 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index b9e7a52..4ff7b2b 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -7,29 +7,17 @@
#include "base/command_line.h"
#include "base/process_util.h"
#include "base/string_util.h"
-#include "build/build_config.h"
#include "chrome/common/child_process.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/plugin/plugin_thread.h"
-#if defined(OS_POSIX)
-#include "chrome/common/ipc_channel_posix.h"
-#endif
-
PluginChannel* PluginChannel::GetPluginChannel(
- int process_id, MessageLoop* ipc_message_loop, int channel_fd) {
+ int process_id, MessageLoop* ipc_message_loop) {
// map renderer's process id to a (single) channel to that process
std::string channel_name = StringPrintf(
"%d.r%d", base::GetCurrentProcId(), process_id);
-#if defined(OS_POSIX)
- // If we were provided an already-open channel, associate it with
- // the channel name in this process's name<->socket map.
- if (channel_fd > 0)
- IPC::AddChannelSocket(channel_name, channel_fd);
-#endif
-
return static_cast<PluginChannel*>(PluginChannelBase::GetChannel(
channel_name,
IPC::Channel::MODE_SERVER,
diff --git a/chrome/plugin/plugin_channel.h b/chrome/plugin/plugin_channel.h
index 21373fb..f0bba80 100644
--- a/chrome/plugin/plugin_channel.h
+++ b/chrome/plugin/plugin_channel.h
@@ -15,12 +15,8 @@
// process. On the renderer side there's a corresponding PluginChannelHost.
class PluginChannel : public PluginChannelBase {
public:
- // Get a new PluginChannel object for the current process.
- // POSIX only: If |channel_fd| > 0, use that file descriptor for the
- // channel socket.
- static PluginChannel* GetPluginChannel(int process_id,
- MessageLoop* ipc_message_loop,
- int channel_fd);
+ static PluginChannel* GetPluginChannel(
+ int process_id, MessageLoop* ipc_message_loop);
~PluginChannel();
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 2f9c2ec..cb92de4 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -102,19 +102,10 @@ void PluginThread::CleanUp() {
lazy_tls.Pointer()->Set(NULL);
}
-void PluginThread::OnCreateChannel(
-#if defined(OS_POSIX)
- base::FileDescriptor socket,
-#endif
- int process_id,
- bool off_the_record) {
- int fd = -1;
-#if defined(OS_POSIX)
- fd = socket.fd;
-#endif
+void PluginThread::OnCreateChannel(int process_id, bool off_the_record) {
std::string channel_name;
scoped_refptr<PluginChannel> channel =
- PluginChannel::GetPluginChannel(process_id, owner_loop(), fd);
+ PluginChannel::GetPluginChannel(process_id, owner_loop());
if (channel.get()) {
channel_name = channel->channel_name();
channel->set_off_the_record(off_the_record);
diff --git a/chrome/plugin/plugin_thread.h b/chrome/plugin/plugin_thread.h
index 911940a..052be0a 100644
--- a/chrome/plugin/plugin_thread.h
+++ b/chrome/plugin/plugin_thread.h
@@ -7,15 +7,10 @@
#include "base/file_path.h"
#include "base/native_library.h"
-#include "build/build_config.h"
#include "chrome/common/child_thread.h"
#include "chrome/plugin/plugin_channel.h"
#include "webkit/glue/plugins/plugin_lib.h"
-#if defined(OS_POSIX)
-#include "base/file_descriptor_posix.h"
-#endif
-
class NotificationService;
// The PluginThread class represents a background thread where plugin instances
@@ -36,14 +31,7 @@ class PluginThread : public ChildThread {
virtual void Init();
virtual void CleanUp();
- // Callback for when a channel has been created.
- // On POSIX, |socket| is the channel endpoint socket.
- void OnCreateChannel(
-#if defined(OS_POSIX)
- base::FileDescriptor socket,
-#endif
- int process_id,
- bool off_the_record);
+ void OnCreateChannel(int process_id, bool off_the_record);
void OnPluginMessage(const std::vector<uint8> &data);
scoped_ptr<NotificationService> notification_service_;
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index 8cc3273..800db41 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -135,9 +135,9 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
delegate_ = WebPluginDelegate::Create(
path, mime_type_, gfx::NativeViewFromId(params.containing_window));
#else
- NOTIMPLEMENTED() << " need to figure out nativeview id business";
- delegate_ = WebPluginDelegate::Create(
- path, mime_type_, NULL);
+ // We don't have gfx::NativeViewFromId on Linux
+ NOTIMPLEMENTED();
+ delegate_ = NULL;
#endif
if (delegate_) {