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

Unified Diff: base/message_pump_glib.cc

Issue 10143001: Work in progress: Adds MessagePumpDispatcher::ShouldExit(). This is used to handle the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « base/message_pump_dispatcher.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_glib.cc
diff --git a/base/message_pump_glib.cc b/base/message_pump_glib.cc
index 07db124b5dad6df553766978bc0020d9f39e768f..2bb67b88b1dd14ecd45c1e5cc27b29309039df1d 100644
--- a/base/message_pump_glib.cc
+++ b/base/message_pump_glib.cc
@@ -11,6 +11,7 @@
#include "base/eintr_wrapper.h"
#include "base/logging.h"
+#include "base/message_pump_dispatcher.h"
#include "base/threading/platform_thread.h"
namespace {
@@ -271,6 +272,12 @@ bool MessagePumpGlib::HandleCheck() {
}
void MessagePumpGlib::HandleDispatch() {
+ MessagePumpDispatcher* dispatcher = GetDispatcher();
+ if (dispatcher && dispatcher->ShouldExit()) {
+ state_->should_quit = true;
+ return;
+ }
+
state_->has_work = false;
if (state_->delegate->DoWork()) {
// NOTE: on Windows at this point we would call ScheduleWork (see
« no previous file with comments | « base/message_pump_dispatcher.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698