| Index: chrome/plugin/webplugin_delegate_stub.cc
|
| ===================================================================
|
| --- chrome/plugin/webplugin_delegate_stub.cc (revision 32617)
|
| +++ chrome/plugin/webplugin_delegate_stub.cc (working copy)
|
| @@ -46,6 +46,22 @@
|
| WebPlugin* webplugin_;
|
| };
|
|
|
| +#if defined(OS_MACOSX)
|
| +namespace {
|
| +
|
| +void FocusNotifier(WebPluginDelegateImpl *instance) {
|
| + uint32 process_id = getpid();
|
| + uint32 instance_id = reinterpret_cast<uint32>(instance);
|
| + PluginThread* plugin_thread = PluginThread::current();
|
| + if (plugin_thread) {
|
| + plugin_thread->Send(
|
| + new PluginProcessHostMsg_PluginReceivedFocus(process_id, instance_id));
|
| + }
|
| +}
|
| +
|
| +}
|
| +#endif
|
| +
|
| WebPluginDelegateStub::WebPluginDelegateStub(
|
| const std::string& mime_type, int instance_id, PluginChannel* channel) :
|
| mime_type_(mime_type),
|
| @@ -164,6 +180,9 @@
|
| params.arg_values,
|
| webplugin_,
|
| params.load_manually);
|
| +#if defined(OS_MACOSX)
|
| + delegate_->SetFocusNotifier(FocusNotifier);
|
| +#endif
|
| }
|
| }
|
|
|
|
|