summaryrefslogtreecommitdiffstats
path: root/base/message_pump_glib.h
Commit message (Collapse)AuthorAgeFilesLines
* This CL adds accelerators to the Linux toolkit views.jcampan@chromium.org2009-07-311-4/+24
| | | | | | | | | | | The MessageLoop had to be modified to support Dispatchers on Linux. BUG=None TEST=On Windows and Linux, make sure the accelerators still work as expected. On Linux toolkit views, build and run the unit-tests. Review URL: http://codereview.chromium.org/159046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22210 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix main loop issues with windowless pluginsevan@chromium.org2009-06-011-5/+8
| | | | | | | | | | | | | | | | | | In certain conditions (e.g. NPN_InvalidateRect taking long), the flash plugin runs its own event loop before returning. It looks roughly like this: while (gtk_events_pending()) { gtk_main_iteration(); } The problem is that our worker source used to force gtk_events_pending() to be always true, because the Check handler always returned TRUE (and that also made HandleDispatch to always run). That caused flash animations to stop and other bad behavior (100% CPU). This CL changes the Check function to return TRUE only if HandleDispatch should be run (i.e., more_work_is_plausible set to true), while also checking whether the loop was woken up, or the delayed work timer expired. HandlePrepare was forcing more_work_is_plausible to be always true apparently to avoid starvation. I removed this, I'm not sure why it is needed. If we get starvation issue, we should raise the priority of WorkSource (for reference, most events run at prio 0, except redraws that run at prio 120. WorkSource runs at prio 200). Another possibility is to force more_work_is_plausible but only every n calls to HandlePrepare. BUG=8202,11843,12278 Review URL: http://codereview.chromium.org/115812 Patch from Antoine Labour <piman@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17357 0039d316-1c4b-4281-b951-d872f2087c98
* Adds DidProcessEvent to MessagePumpGLib.sky@chromium.org2009-05-191-0/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/113600 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16429 0039d316-1c4b-4281-b951-d872f2087c98
* Adds an observer callback to Linux's MessagePumpForUI.sky@chromium.org2009-05-151-0/+29
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/112029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16204 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-131-1/+0
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the glib pump getting wedged.deanm@chromium.org2008-11-181-0/+8
| | | | | | | | I had previously used g_main_context_wakeup which uses glib's internal wakeup pipe. However, this won't ensure that our Dispatch method is called, so I think the poll() was returning, but our events never realized this so we kept on blocking infinitely. We need to make sure our Dispatch() is run when there is a wakeup, which means we have to use our own wakeup pipe so we can handle the event. Review URL: http://codereview.chromium.org/11432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5590 0039d316-1c4b-4281-b951-d872f2087c98
* Restructure the the pump for nested loops.deanm@chromium.org2008-11-131-0/+12
| | | | | | | | Change our work dispatching to be based around an event source. This will allow us to still participate when a message loop is pumped by outside code (nested message loops). Review URL: http://codereview.chromium.org/10854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5331 0039d316-1c4b-4281-b951-d872f2087c98
* Drop the wakeup pipe completely and use the builtin glib wakeup.deanm@chromium.org2008-11-121-10/+0
| | | | | | Review URL: http://codereview.chromium.org/10848 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5296 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite the glib UI pump. Although the previous pump was correct in terms ↵deanm@chromium.org2008-11-121-38/+5
| | | | | | | | of test coverage, it was mis-handling the concept of idle work. This meant we were effectively polling the pump, causing full CPU usage. The new pump is greatly simplified, and follows the pattern used on Windows. All tests still pass. Review URL: http://codereview.chromium.org/10833 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5278 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/8220dsh@google.com2008-11-041-0/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4698 0039d316-1c4b-4281-b951-d872f2087c98
* Implement MessageLoopForUI using GLib. This gets some exercise fromdsh@google.com2008-10-031-0/+100
base_unittest. BUG=1319 Review URL: http://codereview.chromium.org/4261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2834 0039d316-1c4b-4281-b951-d872f2087c98