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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 #endif | 578 #endif |
579 | 579 |
580 #if !defined(OS_NACL) && (defined(TOOLKIT_GTK) || \ | 580 #if !defined(OS_NACL) && (defined(TOOLKIT_GTK) || \ |
581 defined(OS_WIN) || defined(USE_X11)) | 581 defined(OS_WIN) || defined(USE_X11)) |
582 // Please see message_pump_win/message_pump_glib for definitions of these | 582 // Please see message_pump_win/message_pump_glib for definitions of these |
583 // methods. | 583 // methods. |
584 void AddObserver(Observer* observer); | 584 void AddObserver(Observer* observer); |
585 void RemoveObserver(Observer* observer); | 585 void RemoveObserver(Observer* observer); |
586 #endif | 586 #endif |
587 | 587 |
588 #if defined(USE_OZONE) | 588 #if defined(USE_OZONE) && !defined(OS_NACL) |
589 // Please see MessagePumpLibevent for definition. | 589 // Please see MessagePumpLibevent for definition. |
590 bool WatchFileDescriptor( | 590 bool WatchFileDescriptor( |
591 int fd, | 591 int fd, |
592 bool persistent, | 592 bool persistent, |
593 MessagePumpLibevent::Mode mode, | 593 MessagePumpLibevent::Mode mode, |
594 MessagePumpLibevent::FileDescriptorWatcher* controller, | 594 MessagePumpLibevent::FileDescriptorWatcher* controller, |
595 MessagePumpLibevent::Watcher* delegate); | 595 MessagePumpLibevent::Watcher* delegate); |
596 #endif | 596 #endif |
597 | 597 |
598 protected: | 598 protected: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 | 717 |
718 // Do not add any member variables to MessageLoopForIO! This is important b/c | 718 // Do not add any member variables to MessageLoopForIO! This is important b/c |
719 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 719 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
720 // data that you need should be stored on the MessageLoop's pump_ instance. | 720 // data that you need should be stored on the MessageLoop's pump_ instance. |
721 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 721 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
722 MessageLoopForIO_should_not_have_extra_member_variables); | 722 MessageLoopForIO_should_not_have_extra_member_variables); |
723 | 723 |
724 } // namespace base | 724 } // namespace base |
725 | 725 |
726 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 726 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
OLD | NEW |