| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/platform_thread.h" | 12 #include "base/platform_thread.h" |
| 13 | 13 |
| 14 using base::Time; |
| 15 |
| 14 namespace base { | 16 namespace base { |
| 15 | 17 |
| 16 static const char kWorkScheduled = '\0'; | 18 static const char kWorkScheduled = '\0'; |
| 17 static const char kDelayedWorkScheduled = '\1'; | 19 static const char kDelayedWorkScheduled = '\1'; |
| 18 | 20 |
| 19 // I wish these could be const, but g_source_new wants a non-const GSourceFunc | 21 // I wish these could be const, but g_source_new wants a non-const GSourceFunc |
| 20 // pointer. | 22 // pointer. |
| 21 | 23 |
| 22 // static | 24 // static |
| 23 GSourceFuncs MessagePumpForUI::WorkSourceFuncs = { | 25 GSourceFuncs MessagePumpForUI::WorkSourceFuncs = { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 static_cast<WorkSource*>(source)->self = this; | 297 static_cast<WorkSource*>(source)->self = this; |
| 296 | 298 |
| 297 if (optional_poll_fd) | 299 if (optional_poll_fd) |
| 298 g_source_add_poll(source, optional_poll_fd); | 300 g_source_add_poll(source, optional_poll_fd); |
| 299 | 301 |
| 300 g_source_attach(source, context_); | 302 g_source_attach(source, context_); |
| 301 return source; | 303 return source; |
| 302 } | 304 } |
| 303 | 305 |
| 304 } // namespace base | 306 } // namespace base |
| OLD | NEW |