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 #include "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); | 655 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); |
656 } | 656 } |
657 #endif | 657 #endif |
658 | 658 |
659 #if defined(OS_IOS) | 659 #if defined(OS_IOS) |
660 void MessageLoopForUI::Attach() { | 660 void MessageLoopForUI::Attach() { |
661 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); | 661 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); |
662 } | 662 } |
663 #endif | 663 #endif |
664 | 664 |
665 #if defined(OS_WIN) | |
666 void MessageLoopForUI::AddObserver(Observer* observer) { | |
667 static_cast<MessagePumpWin*>(pump_.get())->AddObserver(observer); | |
668 } | |
669 | |
670 void MessageLoopForUI::RemoveObserver(Observer* observer) { | |
671 static_cast<MessagePumpWin*>(pump_.get())->RemoveObserver(observer); | |
672 } | |
673 #endif // defined(OS_WIN) | |
674 | |
675 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) | 665 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) |
676 bool MessageLoopForUI::WatchFileDescriptor( | 666 bool MessageLoopForUI::WatchFileDescriptor( |
677 int fd, | 667 int fd, |
678 bool persistent, | 668 bool persistent, |
679 MessagePumpLibevent::Mode mode, | 669 MessagePumpLibevent::Mode mode, |
680 MessagePumpLibevent::FileDescriptorWatcher *controller, | 670 MessagePumpLibevent::FileDescriptorWatcher *controller, |
681 MessagePumpLibevent::Watcher *delegate) { | 671 MessagePumpLibevent::Watcher *delegate) { |
682 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor( | 672 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor( |
683 fd, | 673 fd, |
684 persistent, | 674 persistent, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 persistent, | 717 persistent, |
728 mode, | 718 mode, |
729 controller, | 719 controller, |
730 delegate); | 720 delegate); |
731 } | 721 } |
732 #endif | 722 #endif |
733 | 723 |
734 #endif // !defined(OS_NACL) | 724 #endif // !defined(OS_NACL) |
735 | 725 |
736 } // namespace base | 726 } // namespace base |
OLD | NEW |