summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 21:06:39 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 21:06:39 +0000
commitda373225b0783166bca66c3534f7bde71eae0c51 (patch)
treebd744dbfae4f427cf4d9a42996e4ef07ea1da9c1 /chrome/browser
parentf98c1541c7c5671ed1de13ffc802d7e0bba276e9 (diff)
downloadchromium_src-da373225b0783166bca66c3534f7bde71eae0c51.zip
chromium_src-da373225b0783166bca66c3534f7bde71eae0c51.tar.gz
chromium_src-da373225b0783166bca66c3534f7bde71eae0c51.tar.bz2
Revert "linux: OOP windowed plugins"
This reverts r19983. Test failures on Mac and Windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/plugin_process_host.cc17
-rw-r--r--chrome/browser/plugin_process_host.h4
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc5
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc18
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view.h5
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc22
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.h6
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h5
9 files changed, 5 insertions, 81 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index bfe5ea8..55885bd 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -20,7 +20,6 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
-#include "base/gfx/native_widget_types.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process_util.h"
@@ -59,10 +58,6 @@
#include "chrome/common/ipc_channel_posix.h"
#endif
-#if defined(OS_LINUX)
-#include "base/gfx/gtk_native_view_id_manager.h"
-#endif
-
static const char kDefaultPluginFinderURL[] =
"http://dl.google.com/chrome/plugins/plugins2.xml";
@@ -293,14 +288,6 @@ void PluginProcessHost::AddWindow(HWND window) {
#endif // defined(OS_WIN)
-#if defined(OS_LINUX)
-void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id,
- gfx::PluginWindowHandle* output) {
- *output = 0;
- Singleton<GtkNativeViewManager>()->GetXIDForId(output, id);
-}
-#endif // defined(OS_LINUX)
-
PluginProcessHost::PluginProcessHost()
: ChildProcessHost(
PLUGIN_PROCESS,
@@ -451,10 +438,6 @@ void PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
OnPluginWindowDestroyed)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_DownloadUrl, OnDownloadUrl)
#endif
-#if defined(OS_LINUX)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId,
- OnMapNativeViewId)
-#endif
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
}
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index 62efdbd..72a5d78 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -110,10 +110,6 @@ class PluginProcessHost : public ChildProcessHost,
gfx::NativeWindow caller_window);
#endif
-#if defined(OS_LINUX)
- void OnMapNativeViewId(gfx::NativeViewId id, gfx::PluginWindowHandle* output);
-#endif
-
virtual bool CanShutdown() { return sent_requests_.empty(); }
struct ChannelRequest {
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index c06d4fa..b7e0ad5 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -671,10 +671,6 @@ bool RenderViewHost::SuddenTerminationAllowed() const {
// RenderViewHost, IPC message handlers:
void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
-#if !defined(OS_LINUX)
- // On Windows there's a potential deadlock with sync messsages going in
- // a circle from browser -> plugin -> renderer -> browser.
- // On Linux we can avoid this by avoiding sync messages from browser->plugin.
if (msg.is_sync() && !msg.is_caller_pumping_messages()) {
NOTREACHED() << "Can't send sync messages to UI thread without pumping "
"messages in the renderer or else deadlocks can occur if the page "
@@ -684,7 +680,6 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
Send(reply);
return;
}
-#endif
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok)
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 88c8c51..5dec932 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -120,12 +120,6 @@ IPC_DEFINE_MESSAGE_MAP(RenderWidgetHost)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor)
IPC_MESSAGE_HANDLER(ViewHostMsg_ImeUpdateStatus, OnMsgImeUpdateStatus)
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_ShowPopup, OnMsgShowPopup(msg))
-#if defined(OS_LINUX)
- IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer,
- OnMsgCreatePluginContainer)
- IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyPluginContainer,
- OnMsgDestroyPluginContainer)
-#endif
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -754,18 +748,6 @@ void RenderWidgetHost::OnMsgShowPopup(const IPC::Message& message) {
#endif
}
-#if defined(OS_LINUX)
-void RenderWidgetHost::OnMsgCreatePluginContainer(
- gfx::PluginWindowHandle *container) {
- *container = view_->CreatePluginContainer();
-}
-
-void RenderWidgetHost::OnMsgDestroyPluginContainer(
- gfx::PluginWindowHandle container) {
- view_->DestroyPluginContainer(container);
-}
-#endif
-
void RenderWidgetHost::PaintBackingStoreRect(TransportDIB* bitmap,
const gfx::Rect& bitmap_rect,
const gfx::Size& view_size) {
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index cf3f9d5..c551498 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -392,10 +392,6 @@ class RenderWidgetHost : public IPC::Channel::Listener {
// having to bring in render_messages.h in a header file.
void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect);
void OnMsgShowPopup(const IPC::Message& message);
-#if defined(OS_LINUX)
- void OnMsgCreatePluginContainer(gfx::PluginWindowHandle *container);
- void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle container);
-#endif
// Paints the given bitmap to the current backing store at the given location.
void PaintBackingStoreRect(TransportDIB* dib,
diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h
index dca077e..2c4a3dc 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -151,11 +151,6 @@ class RenderWidgetHostView {
const std::vector<WebMenuItem>& items) = 0;
#endif
-#if defined(OS_LINUX)
- virtual gfx::PluginWindowHandle CreatePluginContainer() = 0;
- virtual void DestroyPluginContainer(gfx::PluginWindowHandle container) = 0;
-#endif
-
void set_activatable(bool activatable) {
activatable_ = activatable;
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 29d7275..1da195f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -34,8 +34,7 @@ using WebKit::WebInputEventFactory;
class RenderWidgetHostViewGtkWidget {
public:
static GtkWidget* CreateNewWidget(RenderWidgetHostViewGtk* host_view) {
- GtkWidget* widget = gtk_fixed_new();
- gtk_fixed_set_has_window(GTK_FIXED(widget), TRUE);
+ GtkWidget* widget = gtk_drawing_area_new();
gtk_widget_set_double_buffered(widget, FALSE);
#if defined(NDEBUG)
gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &gfx::kGdkWhite);
@@ -376,7 +375,6 @@ RenderWidgetHostViewGtk::~RenderWidgetHostViewGtk() {
void RenderWidgetHostViewGtk::InitAsChild() {
view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this));
- plugin_container_manager_.set_host_widget(view_.get());
gtk_widget_show(view_.get());
}
@@ -386,7 +384,6 @@ void RenderWidgetHostViewGtk::InitAsPopup(
parent_ = parent_host_view->GetNativeView();
GtkWidget* popup = gtk_window_new(GTK_WINDOW_POPUP);
view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this));
- plugin_container_manager_.set_host_widget(view_.get());
gtk_container_add(GTK_CONTAINER(popup), view_.get());
// If we are not activatable, we don't want to grab keyboard input,
@@ -474,9 +471,10 @@ gfx::NativeView RenderWidgetHostViewGtk::GetNativeView() {
void RenderWidgetHostViewGtk::MovePluginWindows(
const std::vector<WebPluginGeometry>& plugin_window_moves) {
- for (size_t i = 0; i < plugin_window_moves.size(); ++i) {
- plugin_container_manager_.MovePluginContainer(plugin_window_moves[i]);
- }
+ if (plugin_window_moves.empty())
+ return;
+
+ NOTIMPLEMENTED();
}
void RenderWidgetHostViewGtk::Focus() {
@@ -575,7 +573,6 @@ void RenderWidgetHostViewGtk::DidScrollRect(const gfx::Rect& rect, int dx,
void RenderWidgetHostViewGtk::RenderViewGone() {
Destroy();
- plugin_container_manager_.set_host_widget(NULL);
}
void RenderWidgetHostViewGtk::Destroy() {
@@ -710,12 +707,3 @@ void RenderWidgetHostViewGtk::ReceivedSelectionText(GtkClipboard* clipboard,
host_view->host_->Send(new ViewMsg_InsertText(host_view->host_->routing_id(),
UTF8ToUTF16(text)));
}
-
-gfx::PluginWindowHandle RenderWidgetHostViewGtk::CreatePluginContainer() {
- return plugin_container_manager_.CreatePluginContainer();
-}
-
-void RenderWidgetHostViewGtk::DestroyPluginContainer(
- gfx::PluginWindowHandle container) {
- plugin_container_manager_.DestroyPluginContainer(container);
-}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
index 1caa1ac..3df3006 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
@@ -12,7 +12,6 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/common/owned_widget_gtk.h"
#include "chrome/common/render_messages.h"
-#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
#include "webkit/glue/webcursor.h"
class RenderWidgetHost;
@@ -60,8 +59,6 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView {
virtual void PasteFromSelectionClipboard();
virtual void ShowingContextMenu(bool showing);
virtual BackingStore* AllocBackingStore(const gfx::Size& size);
- virtual gfx::PluginWindowHandle CreatePluginContainer();
- virtual void DestroyPluginContainer(gfx::PluginWindowHandle container);
gfx::NativeView native_view() const { return view_.get(); }
@@ -140,9 +137,6 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView {
// This state is used when GtkIMContext signal handlers create Char events
// because they don't use the GdkEventKey objects and cannot get the state.
int im_modifier_state_;
-
- // Helper class that lets us allocate plugin containers and move them.
- GtkPluginContainerManager plugin_container_manager_;
};
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index 0b16181..d87ce14 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -79,11 +79,6 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
const std::vector<WebMenuItem>& items) {}
#endif
-#if defined(OS_LINUX)
- virtual gfx::PluginWindowHandle CreatePluginContainer() { return 0; }
- virtual void DestroyPluginContainer(gfx::PluginWindowHandle container) { }
-#endif
-
bool is_showing() const { return is_showing_; }
private: