Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: chrome/plugin/plugin_thread.cc

Issue 399090: Mac: Simulate the OS-level focus handling that windows and linux plugins... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/plugin/plugin_thread.h ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/plugin_thread.cc
===================================================================
--- chrome/plugin/plugin_thread.cc (revision 32617)
+++ chrome/plugin/plugin_thread.cc (working copy)
@@ -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 @@
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 @@
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)
« no previous file with comments | « chrome/plugin/plugin_thread.h ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698