summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove Task.jhawkins@chromium.org2012-01-051-31/+1
| | | | | | | | | | BUG=none TEST=none R=awong Review URL: http://codereview.chromium.org/9086002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116439 0039d316-1c4b-4281-b951-d872f2087c98
* Convert various ReleaseSoon methods to use base::Bind()dcheng@chromium.org2011-12-301-1/+7
| | | | | | | | | | BUG=none TEST=none TBR=brettw,atwilson Review URL: http://codereview.chromium.org/9022034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116030 0039d316-1c4b-4281-b951-d872f2087c98
* Replace MessageLoop::DeleteSoon implementation with one that uses base::Bind.dcheng@chromium.org2011-12-301-1/+9
| | | | | | | | | | | | BUG=none TEST=none TBR=willchan,brettw,tony Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115997 Review URL: http://codereview.chromium.org/9004051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116026 0039d316-1c4b-4281-b951-d872f2087c98
* Add function support for Sleep with TimeDelta input.tedvessenes@gmail.com2011-12-301-0/+20
| | | | | | | | | | | | | | | | | | This is the first step of fixing issue 108171 (converting calls of Sleep() to use TimeDelta instead of ints in milliseconds). I checked platform_thread_unittests.cc for any tests explicitly for Sleep but found none, so I didn't add any for this interface. There will be a bit more implementation juggling here once the Sleep(int ms) interface is removed, but that's coming in a later CL. BUG=108171 TEST= Review URL: http://codereview.chromium.org/8965072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116012 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 115997 - Replace MessageLoop::DeleteSoon implementation with one that ↵dcheng@chromium.org2011-12-291-9/+1
| | | | | | | | | | | | | | | uses base::Bind. BUG=none TEST=none TBR=willchan,brettw,tony Review URL: http://codereview.chromium.org/9004051 TBR=dcheng@chromium.org Review URL: http://codereview.chromium.org/9034029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115999 0039d316-1c4b-4281-b951-d872f2087c98
* Replace MessageLoop::DeleteSoon implementation with one that uses base::Bind.dcheng@chromium.org2011-12-291-1/+9
| | | | | | | | | | BUG=none TEST=none TBR=willchan,brettw,tony Review URL: http://codereview.chromium.org/9004051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115997 0039d316-1c4b-4281-b951-d872f2087c98
* Remove MessageLoop::QuitTask.dcheng@chromium.org2011-12-101-14/+4
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/8894033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113958 0039d316-1c4b-4281-b951-d872f2087c98
* callback_forward.h forward-declares base::Callback and base::Closure.erikwright@chromium.org2011-11-281-1/+1
| | | | | | | | | | | | | | This CL includes callback_forward.h and a number of files that depend on it. Other CLs have been sent to other reviewers, according to OWNERS files. This search shows the other CLs: http://goo.gl/vzQoJ See this chromium-dev thread for the rationale behind the change: http://goo.gl/I3kob BUG=None TEST=Compiles Review URL: http://codereview.chromium.org/8702019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111782 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete usage of TOUCH_UI.saintlou@chromium.org2011-11-231-1/+1
| | | | | | | | | | BUG=105046 TEST=none Review URL: http://codereview.chromium.org/8660001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111287 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFrame: Convert TaskMarshallerThroughMessageQueue to new Callback system.jhawkins@chromium.org2011-11-171-4/+1
| | | | | | | | | | | BUG=none TEST=none R=willchan@chromium.org,stoyan@chromium.org Review URL: http://codereview.chromium.org/8591009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110595 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to base/.avi@chromium.org2011-11-161-4/+4
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8520018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110218 0039d316-1c4b-4281-b951-d872f2087c98
* base: Refactor PendingTask out of MessageLoop.jhawkins@chromium.org2011-11-151-44/+15
| | | | | | | | | | | | | Also removes copy/pasted instances of this class. BUG=none TEST=none R=willchan@chromium.org Review URL: http://codereview.chromium.org/8565024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110206 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in base, dbug, gpu, ipc, ↵thestig@chromium.org2011-11-151-6/+2
| | | | | | | | | | jingle, and media. BUG=none TEST=none Review URL: http://codereview.chromium.org/8511045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109998 0039d316-1c4b-4281-b951-d872f2087c98
* Add CHECK to catch places where BrowserProcessImpl's refcount goes to 0.willchan@chromium.org2011-11-011-0/+3
| | | | | | | | | | | | Specifically, catch it when MessageLoop is not running. BUG=96847 TEST=none Review URL: http://codereview.chromium.org/8343033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108177 0039d316-1c4b-4281-b951-d872f2087c98
* Enable tracking of objects by defaultjar@chromium.org2011-10-311-14/+2
| | | | | | | | | | | | | | | | | | | This is a reland of accumulated patches including CLs 8414036, 8425010, 8425013, 8424013. It fully enables tracking of objects, as seen in about:tracking in teh release build. The problem this had in its initaial landing centered on Mac instability in base_unittest. We were encountering crash on exit of the tests, with a stack dump involving pthreads. r=rtenneti BUG=101856 Review URL: http://codereview.chromium.org/8429009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108026 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107895 - Fully enable about:tracking by defaultjoth@chromium.org2011-10-311-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of: http://codereview.chromium.org/8391019/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107793 Original landing had trouble with message_loop_x.h, due to header include ordering. I pulled out the structure that was really needed by tracked_objects.h into a new file tracked_info.*. This allows tracked_objects to inlude this tracked_info, but not have to include the message_loop.h totality. I also removed a DCHECK that that was triggering on a test, and added yet one more file (browser_main.cc) where I removed a #ifdef for TRACKING_ALL_OBJECTS. The changes were minor, and I'm hoping to get clear perf runs with tihs landing, so I'm going to TBR it and reland early in the morning. Comments from original landing: Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. tbr=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8414036 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8430004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107961 0039d316-1c4b-4281-b951-d872f2087c98
* Fully enable about:tracking by defaultjar@chromium.org2011-10-301-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of: http://codereview.chromium.org/8391019/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107793 Original landing had trouble with message_loop_x.h, due to header include ordering. I pulled out the structure that was really needed by tracked_objects.h into a new file tracked_info.*. This allows tracked_objects to inlude this tracked_info, but not have to include the message_loop.h totality. I also removed a DCHECK that that was triggering on a test, and added yet one more file (browser_main.cc) where I removed a #ifdef for TRACKING_ALL_OBJECTS. The changes were minor, and I'm hoping to get clear perf runs with tihs landing, so I'm going to TBR it and reland early in the morning. Comments from original landing: Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. tbr=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8414036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107895 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107793 - Fully enable about:tracking by defaultjar@chromium.org2011-10-281-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. r=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8391019 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8400073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107799 0039d316-1c4b-4281-b951-d872f2087c98
* Fully enable about:tracking by defaultjar@chromium.org2011-10-281-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. r=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8391019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107793 0039d316-1c4b-4281-b951-d872f2087c98
* rename Run in MessageLoopForUI to RunWithDispatcheroshima@google.com2011-10-241-1/+1
| | | | | | | | | BUG=99471 TEST=none Review URL: http://codereview.chromium.org/8343023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106896 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Cleanup in automation.jhawkins@chromium.org2011-10-171-5/+9
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8212006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105761 0039d316-1c4b-4281-b951-d872f2087c98
* Add RunAllPendingWithDispatcheroshima@google.com2011-10-061-0/+1
| | | | | | | | | | | On X11/Aura, MessagePumpX doesn't know how to dispatch event and needs explicit dispatcher to dispatch events. Thus, simply running RunAllPending can't run pending events if a dispatcher is not already set. This CL address this by adding new RunAllPendingWithDispatcher method. BUG=none TEST=views_unittests on X11/Aura runs without hang. Review URL: http://codereview.chromium.org/8173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104324 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate message observer API for MessagePumpX and MessagePumWinoshima@google.com2011-10-041-1/+1
| | | | | | | | | | | This is an attempt to simplify the code around message pump observer. BUG=none TEST=none Review URL: http://codereview.chromium.org/8021009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103825 0039d316-1c4b-4281-b951-d872f2087c98
* Add trace code to track all posted tasks in message_loop and WorkerThreads ↵jbates@chromium.org2011-10-031-3/+3
| | | | | | | | | | | | (non-official builds only). It's very helpful to understand what chrome is doing at runtime. Sometimes a thread in chrome does something expensive that causes a frame hitch. With this change, any expensive task will show up clearly in traces, with the file/function of where the task was posted. TEST=go to about:tracing, run a trace and notice that all tasks are traced. Review URL: http://codereview.chromium.org/7778033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103740 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream ProcessUtilTest, and make a few other files compile on Android.jingzhao@chromium.org2011-09-291-2/+2
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8059007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103236 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-211-1/+1
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98
* aura: A few changes to have aura_demo compile and run on linux.sadrul@chromium.org2011-09-071-1/+1
| | | | | | | | | | | | | * Make 'aura' a component, and export Desktop and Window. * Events (Key and Mouse) from X Events. * Rip non-gtk bits out of gfx/gtk_util into gfx/linux_util BUG=93934,93933 TEST=none Review URL: http://codereview.chromium.org/7833016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99898 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread.ajwong@chromium.org2011-08-181-1/+1
| | | | | | | | | | | | | This ensures that the request/reply closures are always deleted on the origin thread, or leaked if the task cannot be completed (due to message loop shutdown). BUG=86301 TEST=new unittests Review URL: http://codereview.chromium.org/7210053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97387 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoopProxy::currentnduca@chromium.org2011-08-151-0/+9
| | | | | | Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
* Adding Wayland message loop and gyp build depsdnicoara@chromium.org2011-08-111-1/+5
| | | | | | | | | | | | This CL depends on http://codereview.chromium.org/7457023 BUG= TEST= Review URL: http://codereview.chromium.org/7473010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96428 0039d316-1c4b-4281-b951-d872f2087c98
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-051-7/+7
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Android's paths and message loop implementation with JNImichaelbai@google.com2011-08-021-2/+20
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7518032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95085 0039d316-1c4b-4281-b951-d872f2087c98
* re-landing r93629oshima@google.com2011-07-221-13/+0
| | | | | | | | | | | | | | | | | | | | | | Consolidate access to X Display Change ui::GetXDisplay to use the MessagePumpForUI class to get Display. This allows us to have two different implementation for x and gtk. Remove MessageLoop::GetDisplay from message loop API. Client should use ui::GetXDisplay instead. This will also be removed in near future, and client should get display from window it is dealing with. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93629 Review URL: http://codereview.chromium.org/7484006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93686 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93629 - Linux build failure: ↵leandrogracia@chromium.org2011-07-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28shared%29/builds/4098/steps/compile/logs/stdio#error1 Consolidate access to X Display Change ui::GetXDisplay to use the MessagePumpForUI class to get Display. This allows us to have two different implementation for x and gtk. Remove MessageLoop::GetDisplay from message loop API. Client should use ui::GetXDisplay instead. This will also be removed in near future, and client should get display from window it is dealing with. BUG=none TEST=none Review URL: http://codereview.chromium.org/7484006 TBR=oshima@google.com Review URL: http://codereview.chromium.org/7493014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93633 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate access to X Displayoshima@google.com2011-07-221-13/+0
| | | | | | | | | | | | | | | | | | Change ui::GetXDisplay to use the MessagePumpForUI class to get Display. This allows us to have two different implementation for x and gtk. Remove MessageLoop::GetDisplay from message loop API. Client should use ui::GetXDisplay instead. This will also be removed in near future, and client should get display from window it is dealing with. BUG=none TEST=none Review URL: http://codereview.chromium.org/7484006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93629 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the glib message-pump, and use it as the base for a gtk message ↵sadrul@chromium.org2011-06-241-9/+7
| | | | | | | | | | | | | | | | | | | pump and an X message pump. The changes: * Rename MessagePumpGlibX to MessagePumpX. * Rename MessagePumpForUI to MessagePumpGlib. * Move some stuff out of MessagePumpGlib, and into MessagePumpGtk and MessagePumpX. * Rename MessagePumpForUI::Observer to MessageObserver, moved the platform-specific implementations into MessagePumpGtk and MessagePumpX. Ditto for MessagePumpForUI::Dispatcher. MessagePumpX is independent of MessagePumpGtk. At the moment, MessagePumpX does process some GDK event, but once we have a complete native_widget_x, we can take out the GDK processing and things should continue to work. BUG=none TEST=existing message-pump tests. Review URL: http://codereview.chromium.org/7250001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90418 0039d316-1c4b-4281-b951-d872f2087c98
* Virtual destructors should have virtual keyword.hans@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | | | Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
* Tag all tracked objects, including Tasks, with the program counter at the ↵apatrick@chromium.org2011-05-191-0/+3
| | | | | | | | | | | | | | | | site of FROM_HERE. This is to make it easier to determine the site Tasks are posted from in release builds, especially when only a minidump is available. It should help diagnose http://crbug.com/81499. I added a debug function to alias variables so that the optimizer will not strip them out if they are not live. The semantics of the MessageLoop::PostTask functions is changed and it is wrong but I am not sure what semantics are intended. It seems location information was no longer being tracked for Tasks wrapped as Closures and I don't know if this was intended. PTAL. Update: this has since been fixed. TEST=Set breakpoint in TaskClosureAdapter::Run and very that the post site can be located in an optimized build. BUG=81499 Review URL: http://codereview.chromium.org/7039020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85991 0039d316-1c4b-4281-b951-d872f2087c98
* X message pump: Allow adding observers for XEvents.sadrul@chromium.org2011-05-111-4/+3
| | | | | | | | | | | | | | | | | | These observers are slightly different from the normal observers, as in they can return a value to indicate if the XEvent should be dispatched or not. This will allow the event observers to act on an event (e.g. SystemKeyEventListener) and stop the event to be dispatched any farther. This is currently done using gdk_window_event_filter, but since the X message pump dispatches the X events before the event reaches GDK, that technique does not work. This is a fix for that. A future CL will add that support in SystemKeyEventListener using this observer. BUG=none TEST=none Review URL: http://codereview.chromium.org/7013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85041 0039d316-1c4b-4281-b951-d872f2087c98
* Base: More adjustments to BASE_API and project dependencies torvargas@google.com2011-04-211-1/+1
| | | | | | | | | | use base.dll from chrome. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6877053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82564 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for base::Closure in the MessageLoop, and reimplement the whole ↵ajwong@chromium.org2011-04-201-16/+76
| | | | | | | | | | | sucker on top of base::Closure. After this, all Task objects that are posted will be wrapped in a closure prior to dispatch. BUG=35223 TEST=unittests. Review URL: http://codereview.chromium.org/6463013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82300 0039d316-1c4b-4281-b951-d872f2087c98
* Use lock-free lazy initialization for static histogram referencesjar@chromium.org2011-04-051-1/+1
| | | | | | | | | | | | | | | | Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Review URL: http://codereview.chromium.org/6780035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80412 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more files using BASE_API (for base.dll)rvargas@google.com2011-03-251-5/+7
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6736019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79427 0039d316-1c4b-4281-b951-d872f2087c98
* When we process the tickler message in our windows message pump, we should ↵ananta@chromium.org2011-03-241-0/+13
| | | | | | | | | | | | | | | | | | | | not dispatch all window messages specifically if we are in the context of a Windows modal loop, i.e. a Windows API like TrackPopupMenu, etc. This is because these API's expect to handle input messages like keyboard and mouse messages by peeking them from the queue and handling them. Our message pump currently dispatches all windows messages while processing the tickler message which causes the windows modal loop to not see keyboard and mouse messages at times. Added a flag in the windows message loop which indicates if we are in the context of an os modal loop. If yes we just peek for WM_PAINT and timer and dispatch those and get out. Fixes bug http://code.google.com/p/chromium/issues/detail?id=59864 BUG=59864 Review URL: http://codereview.chromium.org/6676099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79248 0039d316-1c4b-4281-b951-d872f2087c98
* Fix style mistakes in r75477.ajwong@chromium.org2011-02-251-6/+14
| | | | | | | | | | | Associated review at: http://codereview.chromium.org/6489031/ BUG=none TEST=none Review URL: http://codereview.chromium.org/6532102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76074 0039d316-1c4b-4281-b951-d872f2087c98
* Run event executor on the ui thread to remove the need to explicitly ↵ajwong@chromium.org2011-02-191-0/+5
| | | | | | | | | | | | XFlush() the XTest calls. BUG=none TEST=Connect to a host and try moving the mouse and typing. Both inputs should be reflected correctly. Review URL: http://codereview.chromium.org/6489031 Patch from Jamie Walch <jamiewalch@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75477 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads.willchan@chromium.org2011-01-261-2/+5
| | | | | | | | | BUG=chrome-os:11110 TEST=existing Review URL: http://codereview.chromium.org/6374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72576 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-2/+2
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98