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

Side by Side Diff: base/message_loop/message_pump_glib.cc

Issue 15709015: Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/message_loop/message_pump_glib.h ('k') | base/message_loop/message_pump_libevent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/message_pump_glib.h" 5 #include "base/message_loop/message_pump_glib.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include <glib.h> 10 #include <glib.h>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 } 314 }
315 315
316 void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) { 316 void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
317 // We need to wake up the loop in case the poll timeout needs to be 317 // We need to wake up the loop in case the poll timeout needs to be
318 // adjusted. This will cause us to try to do work, but that's ok. 318 // adjusted. This will cause us to try to do work, but that's ok.
319 delayed_work_time_ = delayed_work_time; 319 delayed_work_time_ = delayed_work_time;
320 ScheduleWork(); 320 ScheduleWork();
321 } 321 }
322 322
323 void MessagePumpGlib::Shutdown() {
324 }
325
323 MessagePumpGlib::~MessagePumpGlib() { 326 MessagePumpGlib::~MessagePumpGlib() {
324 g_source_destroy(work_source_); 327 g_source_destroy(work_source_);
325 g_source_unref(work_source_); 328 g_source_unref(work_source_);
326 close(wakeup_pipe_read_); 329 close(wakeup_pipe_read_);
327 close(wakeup_pipe_write_); 330 close(wakeup_pipe_write_);
328 } 331 }
329 332
330 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() { 333 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() {
331 return state_ ? state_->dispatcher : NULL; 334 return state_ ? state_->dispatcher : NULL;
332 } 335 }
333 336
334 } // namespace base 337 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_glib.h ('k') | base/message_loop/message_pump_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698