diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/ipc_message_utils.h | 19 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 10 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.h | 4 |
3 files changed, 29 insertions, 4 deletions
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h index 2ae2ab5..8c50d6e 100644 --- a/chrome/common/ipc_message_utils.h +++ b/chrome/common/ipc_message_utils.h @@ -176,6 +176,25 @@ struct ParamTraits<long> { } }; +// unsigned long is used for serializing X window ids. +template <> +struct ParamTraits<unsigned long> { + typedef unsigned long param_type; + static void Write(Message* m, const param_type& p) { + m->WriteLong(p); + } + static bool Read(const Message* m, void** iter, param_type* r) { + long read_output; + if (!m->ReadLong(iter, &read_output)) + return false; + *r = static_cast<unsigned long>(read_output); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + l->append(StringPrintf(L"%ul", p)); + } +}; + template <> struct ParamTraits<size_t> { typedef size_t param_type; diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 286659b..57c07fc 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -56,15 +56,21 @@ bool WebPluginProxy::Send(IPC::Message* msg) { return channel_->Send(msg); } -void WebPluginProxy::SetWindow(gfx::NativeView window) { +void WebPluginProxy::SetWindow(gfx::PluginWindowHandle window) { +#if defined(OS_WIN) Send(new PluginHostMsg_SetWindow(route_id_, gfx::IdFromNativeView(window))); +#else + NOTIMPLEMENTED(); +#endif } -void WebPluginProxy::WillDestroyWindow(gfx::NativeView window) { +void WebPluginProxy::WillDestroyWindow(gfx::PluginWindowHandle window) { #if defined(OS_WIN) PluginThread::current()->Send( new PluginProcessHostMsg_PluginWindowDestroyed( window, ::GetParent(window))); +#else + NOTIMPLEMENTED(); #endif } diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h index 46c16d1..e143297 100644 --- a/chrome/plugin/webplugin_proxy.h +++ b/chrome/plugin/webplugin_proxy.h @@ -37,8 +37,8 @@ class WebPluginProxy : public WebPlugin { ~WebPluginProxy(); // WebPlugin overrides - void SetWindow(gfx::NativeView window); - void WillDestroyWindow(gfx::NativeView window); + void SetWindow(gfx::PluginWindowHandle window); + void WillDestroyWindow(gfx::PluginWindowHandle window); #if defined(OS_WIN) void SetWindowlessPumpEvent(HANDLE pump_messages_event); // Returns true on success. |