| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 595 |
| 596 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) | 596 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) |
| 597 // Please see MessagePumpLibevent for definition. | 597 // Please see MessagePumpLibevent for definition. |
| 598 bool WatchFileDescriptor( | 598 bool WatchFileDescriptor( |
| 599 int fd, | 599 int fd, |
| 600 bool persistent, | 600 bool persistent, |
| 601 MessagePumpLibevent::Mode mode, | 601 MessagePumpLibevent::Mode mode, |
| 602 MessagePumpLibevent::FileDescriptorWatcher* controller, | 602 MessagePumpLibevent::FileDescriptorWatcher* controller, |
| 603 MessagePumpLibevent::Watcher* delegate); | 603 MessagePumpLibevent::Watcher* delegate); |
| 604 #endif | 604 #endif |
| 605 |
| 606 #if defined(USE_X11) |
| 607 // Please see MessagePumpLibevent for definition. |
| 608 void SetEventSource(MessagePumpLibevent::EventSource* event_source); |
| 609 void ClearEventSource(); |
| 610 #endif |
| 605 }; | 611 }; |
| 606 | 612 |
| 607 // Do not add any member variables to MessageLoopForUI! This is important b/c | 613 // Do not add any member variables to MessageLoopForUI! This is important b/c |
| 608 // MessageLoopForUI is often allocated via MessageLoop(TYPE_UI). Any extra | 614 // MessageLoopForUI is often allocated via MessageLoop(TYPE_UI). Any extra |
| 609 // data that you need should be stored on the MessageLoop's pump_ instance. | 615 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 610 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI), | 616 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI), |
| 611 MessageLoopForUI_should_not_have_extra_member_variables); | 617 MessageLoopForUI_should_not_have_extra_member_variables); |
| 612 | 618 |
| 613 #endif // !defined(OS_NACL) | 619 #endif // !defined(OS_NACL) |
| 614 | 620 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 693 |
| 688 // Do not add any member variables to MessageLoopForIO! This is important b/c | 694 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 689 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 695 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 690 // data that you need should be stored on the MessageLoop's pump_ instance. | 696 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 691 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 697 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 692 MessageLoopForIO_should_not_have_extra_member_variables); | 698 MessageLoopForIO_should_not_have_extra_member_variables); |
| 693 | 699 |
| 694 } // namespace base | 700 } // namespace base |
| 695 | 701 |
| 696 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 702 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |