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

Side by Side Diff: base/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: CR feedback. 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
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_pump_glib.h" 5 #include "base/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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 } 315 }
316 316
317 void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) { 317 void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
318 // We need to wake up the loop in case the poll timeout needs to be 318 // We need to wake up the loop in case the poll timeout needs to be
319 // adjusted. This will cause us to try to do work, but that's ok. 319 // adjusted. This will cause us to try to do work, but that's ok.
320 delayed_work_time_ = delayed_work_time; 320 delayed_work_time_ = delayed_work_time;
321 ScheduleWork(); 321 ScheduleWork();
322 } 322 }
323 323
324 void MessagePumpGlib::Stop() {
325 }
326
324 MessagePumpGlib::~MessagePumpGlib() { 327 MessagePumpGlib::~MessagePumpGlib() {
325 g_source_destroy(work_source_); 328 g_source_destroy(work_source_);
326 g_source_unref(work_source_); 329 g_source_unref(work_source_);
327 close(wakeup_pipe_read_); 330 close(wakeup_pipe_read_);
328 close(wakeup_pipe_write_); 331 close(wakeup_pipe_write_);
329 } 332 }
330 333
331 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() { 334 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() {
332 return state_ ? state_->dispatcher : NULL; 335 return state_ ? state_->dispatcher : NULL;
333 } 336 }
334 337
335 } // namespace base 338 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698