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

Unified Diff: ui/events/platform/platform_event_source.cc

Issue 274383002: events: Remove ability to terminate a nested message-loop from the event-source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/platform/platform_event_source.cc
diff --git a/ui/events/platform/platform_event_source.cc b/ui/events/platform/platform_event_source.cc
index ffe23001c5f6703640720a223a473fef8997afe9..a93fd3ed07ca8b3d799f72c543a3a77eff96cbbf 100644
--- a/ui/events/platform/platform_event_source.cc
+++ b/ui/events/platform/platform_event_source.cc
@@ -65,14 +65,12 @@ void PlatformEventSource::RemovePlatformEventObserver(
uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
uint32_t action = POST_DISPATCH_PERFORM_DEFAULT;
- bool should_quit = false;
FOR_EACH_OBSERVER(PlatformEventObserver, observers_,
WillProcessEvent(platform_event));
// Give the overridden dispatcher a chance to dispatch the event first.
if (overridden_dispatcher_)
action = overridden_dispatcher_->DispatchEvent(platform_event);
- should_quit = !!(action & POST_DISPATCH_QUIT_LOOP);
if ((action & POST_DISPATCH_PERFORM_DEFAULT) &&
dispatchers_.might_have_observers()) {
@@ -80,8 +78,6 @@ uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
while (PlatformEventDispatcher* dispatcher = iter.GetNext()) {
if (dispatcher->CanDispatchEvent(platform_event))
action = dispatcher->DispatchEvent(platform_event);
- if (action & POST_DISPATCH_QUIT_LOOP)
- should_quit = true;
if (action & POST_DISPATCH_STOP_PROPAGATION)
break;
}
@@ -89,25 +85,22 @@ uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
FOR_EACH_OBSERVER(PlatformEventObserver, observers_,
DidProcessEvent(platform_event));
- // Terminate the message-loop if the dispatcher requested for it.
- if (should_quit) {
- base::MessageLoop::current()->QuitNow();
- action |= POST_DISPATCH_QUIT_LOOP;
- }
-
// If an overridden dispatcher has been destroyed, then the platform
// event-source should halt dispatching the current stream of events, and wait
// until the next message-loop iteration for dispatching events. This lets any
// nested message-loop to unwind correctly and any new dispatchers to receive
// the correct sequence of events.
if (overridden_dispatcher_restored_)
- action |= POST_DISPATCH_QUIT_LOOP;
+ StopCurrentEventStream();
overridden_dispatcher_restored_ = false;
return action;
}
+void PlatformEventSource::StopCurrentEventStream() {
+}
+
void PlatformEventSource::OnDispatcherListChanged() {
}

Powered by Google App Engine
This is Rietveld 408576698