diff options
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index 55885bd..bfe5ea8 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -20,6 +20,7 @@ #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" @@ -58,6 +59,10 @@ #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"; @@ -288,6 +293,14 @@ 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, @@ -438,6 +451,10 @@ 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() } |