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

Unified Diff: chrome/plugin/webplugin_delegate_stub.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.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
}
« no previous file with comments | « chrome/plugin/plugin_thread.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698