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

Side by Side 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, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #endif 9 #endif
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 trimmed_list.c_str(), 1); 60 trimmed_list.c_str(), 1);
61 } else { 61 } else {
62 NOTREACHED() << "Missing Carbon interposing library"; 62 NOTREACHED() << "Missing Carbon interposing library";
63 } 63 }
64 } 64 }
65 #endif // OS_MACOSX 65 #endif // OS_MACOSX
66 66
67 // main() routine for running as the plugin process. 67 // main() routine for running as the plugin process.
68 int PluginMain(const MainFunctionParams& parameters) { 68 int PluginMain(const MainFunctionParams& parameters) {
69 // The main thread of the plugin services UI. 69 // The main thread of the plugin services UI.
70 #if defined(OS_MACOSX)
71 // For Mac NPAPI plugins, we don't want a MessageLoop::TYPE_UI because
72 // that will cause events to be dispatched via the Cocoa responder chain.
73 // If the plugin creates its own windows with Carbon APIs (for example,
74 // full screen mode in Flash), those windows would not receive events.
75 // Instead, WebPluginDelegateImpl::OnNullEvent will dispatch any pending
76 // system events directly to the plugin.
77 MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT);
78 #else
70 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 79 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
80 #endif
71 std::wstring app_name = chrome::kBrowserAppName; 81 std::wstring app_name = chrome::kBrowserAppName;
72 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); 82 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str());
73 83
74 // Initialize the SystemMonitor 84 // Initialize the SystemMonitor
75 base::SystemMonitor::Start(); 85 base::SystemMonitor::Start();
76 86
77 #if defined(OS_MACOSX) 87 #if defined(OS_MACOSX)
78 TrimInterposeEnvironment(); 88 TrimInterposeEnvironment();
79 #endif 89 #endif
80 90
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 156
147 MessageLoop::current()->Run(); 157 MessageLoop::current()->Run();
148 } 158 }
149 159
150 #if defined(OS_WIN) 160 #if defined(OS_WIN)
151 CoUninitialize(); 161 CoUninitialize();
152 #endif 162 #endif
153 163
154 return 0; 164 return 0;
155 } 165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698