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

Issue 10143001: Work in progress: Adds MessagePumpDispatcher::ShouldExit(). This is used to handle the (Closed)

Created:
8 years, 8 months ago by sky
Modified:
8 years, 8 months ago
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org, sadrul, tfarina, ben+watch_chromium.org
Visibility:
Public.

Description

Adds MessagePumpDispatcher::ShouldExit(). This is used to handle the case of needing to exit a nested message loop before processing a Task. With Aura we get far fewer real X events, which means it's entirely possible we want to exit the nested message loop but can't because the exit won't happen until the next X event. BUG=124123 TEST=none R=darin@chromium.org

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -21 lines) Patch
M ash/accelerators/accelerator_dispatcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M ash/accelerators/accelerator_dispatcher.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ash/accelerators/nested_dispatcher_controller_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M base/message_pump_dispatcher.h View 2 chunks +9 lines, -4 lines 0 comments Download
M base/message_pump_glib.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc View 5 chunks +58 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/simple_message_box_views.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/simple_message_box_views.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/dispatcher_linux.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/dispatcher_linux.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/monitor_change_observer_x11.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/monitor_change_observer_x11.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/root_window_host_linux.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/root_window_host_linux.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_controller.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 2 chunks +4 lines, -10 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
sky
This isn't done, I wanted to make sure you're ok with it before I clean ...
8 years, 8 months ago (2012-04-19 21:33:37 UTC) #1
sky
Ping
8 years, 8 months ago (2012-04-24 03:31:55 UTC) #2
darin (slow to review)
MessageLoop::QuitNow() does not suffice?
8 years, 8 months ago (2012-04-24 03:36:49 UTC) #3
sky
It too has the same problem I'm addressing here. Also, QuitNow is risky here since ...
8 years, 8 months ago (2012-04-24 04:25:49 UTC) #4
sky
As you said, QuitNow does what I need. I'm closing this patch so it isn't ...
8 years, 8 months ago (2012-04-26 00:14:28 UTC) #5
darin (slow to review)
That's great to hear! On Wed, Apr 25, 2012 at 5:14 PM, <sky@chromium.org> wrote: > ...
8 years, 8 months ago (2012-04-26 02:47:59 UTC) #6
sky
So, of course I ran into a bug where my quit was quitting someone elses ...
8 years, 7 months ago (2012-05-10 01:10:13 UTC) #7
darin (slow to review)
Maybe we need a mechanism to refer to a particular invocation of MessageLoop::Run() so that ...
8 years, 7 months ago (2012-05-10 07:00:22 UTC) #8
sky
8 years, 7 months ago (2012-05-10 16:08:57 UTC) #9
Better yet, I should redo menus so they don't need the nested message
loop. Other than changing all existing code the only thing I really
need is the ability to get in the way of native message dispatching.
Maybe we should add the ability to set a Dispatcher without running a
nested message loop.

  -Scott

On Thu, May 10, 2012 at 12:00 AM, Darin Fisher <darin@chromium.org> wrote:
> Maybe we need a mechanism to refer to a particular invocation of
> MessageLoop::Run() so that Quit / QuitNow will only quit the intended
> invocation.  Hmm...
>
> -Darin
>
>
> On Wed, May 9, 2012 at 6:10 PM, Scott Violet <sky@chromium.org> wrote:
>>
>> So, of course I ran into a bug where my quit was quitting someone
>> elses nested message loop. I can work around this particular loop, but
>> oy. Arbitrary quitting is error prone.
>> Ugh!
>>
>>  -Scott
>>
>> On Wed, Apr 25, 2012 at 7:47 PM, Darin Fisher <darin@chromium.org> wrote:
>> > That's great to hear!
>> >
>> >
>> > On Wed, Apr 25, 2012 at 5:14 PM, <sky@chromium.org> wrote:
>> >>
>> >> As you said, QuitNow does what I need. I'm closing this patch so it
>> >> isn't
>> >> needed.
>> >>
>> >> Thanks!
>> >>
>> >> http://codereview.chromium.org/10143001/
>> >
>> >
>
>

Powered by Google App Engine
This is Rietveld 408576698