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

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 16464: Add a dummy PostThreadMessage and PeekMessage call to help inform Windows tha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 12 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 7406)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -206,6 +206,23 @@
}
}
+void CommonSubprocessInit() {
+#if defined(OS_WIN)
+ // Initialize ResourceBundle which handles files loaded from external
+ // sources. The language should have been passed in to us from the
+ // browser process as a command line flag.
+ // TODO(port): enable when we figure out resource bundle issues
+ ResourceBundle::InitSharedInstance(std::wstring());
+
+ // HACK: Let Windows know that we have started. This is needed to suppress
+ // the IDC_APPSTARTING cursor from being displayed for a prolonged period
+ // while a subprocess is starting.
+ PostThreadMessage(GetCurrentThreadId(), WM_NULL, 0, 0);
+ MSG msg;
+ PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
+#endif
+}
+
} // namespace
#if defined(OS_WIN)
@@ -311,15 +328,8 @@
}
#endif // NDEBUG
- if (!process_type.empty()) {
-#if defined(OS_WIN)
- // Initialize ResourceBundle which handles files loaded from external
- // sources. The language should have been passed in to us from the
- // browser process as a command line flag.
- // TODO(port): enable when we figure out resource bundle issues
- ResourceBundle::InitSharedInstance(std::wstring());
-#endif
- }
+ if (!process_type.empty())
+ CommonSubprocessInit();
startup_timer.Stop(); // End of Startup Time Measurement.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698