diff options
Diffstat (limited to 'chrome/plugin/plugin_thread.cc')
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 914a8ce..9ef6c45 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -21,6 +21,7 @@ #include "net/base/net_errors.h" #include "webkit/glue/plugins/plugin_lib.h" #include "webkit/glue/webkit_glue.h" +#include "webkit/glue/plugins/webplugin_delegate_impl.h" static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( base::LINKER_INITIALIZED); @@ -102,6 +103,10 @@ void PluginThread::OnControlMessageReceived(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP(PluginThread, msg) IPC_MESSAGE_HANDLER(PluginProcessMsg_CreateChannel, OnCreateChannel) IPC_MESSAGE_HANDLER(PluginProcessMsg_PluginMessage, OnPluginMessage) +#if defined(OS_MACOSX) + IPC_MESSAGE_HANDLER(PluginProcessMsg_PluginFocusNotify, + OnPluginFocusNotify) +#endif IPC_END_MESSAGE_MAP() } @@ -138,6 +143,20 @@ void PluginThread::OnPluginMessage(const std::vector<unsigned char> &data) { ChildProcess::current()->ReleaseProcess(); } +#if defined(OS_MACOSX) +void PluginThread::OnPluginFocusNotify(uint32 instance_id) { + WebPluginDelegateImpl* instance = + reinterpret_cast<WebPluginDelegateImpl*>(instance_id); + std::set<WebPluginDelegateImpl*> active_delegates = + WebPluginDelegateImpl::GetActiveDelegates(); + for (std::set<WebPluginDelegateImpl*>::iterator iter = + active_delegates.begin(); + iter != active_delegates.end(); iter++) { + (*iter)->FocusNotify(instance); + } +} +#endif + namespace webkit_glue { #if defined(OS_WIN) |