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

Unified Diff: chrome/plugin/plugin_main.cc

Issue 257008: Fix several issues around fullscreen Mac plugins:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months 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
Index: chrome/plugin/plugin_main.cc
===================================================================
--- chrome/plugin/plugin_main.cc (revision 27721)
+++ chrome/plugin/plugin_main.cc (working copy)
@@ -67,7 +67,17 @@
// main() routine for running as the plugin process.
int PluginMain(const MainFunctionParams& parameters) {
// The main thread of the plugin services UI.
+#if defined(OS_MACOSX)
+ // For Mac NPAPI plugins, we don't want a MessageLoop::TYPE_UI because
+ // that will cause events to be dispatched via the Cocoa responder chain.
+ // If the plugin creates its own windows with Carbon APIs (for example,
+ // full screen mode in Flash), those windows would not receive events.
+ // Instead, WebPluginDelegateImpl::OnNullEvent will dispatch any pending
+ // system events directly to the plugin.
+ MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT);
+#else
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
+#endif
std::wstring app_name = chrome::kBrowserAppName;
PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str());

Powered by Google App Engine
This is Rietveld 408576698