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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); | 662 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); |
663 } | 663 } |
664 #endif | 664 #endif |
665 | 665 |
666 #if defined(OS_IOS) | 666 #if defined(OS_IOS) |
667 void MessageLoopForUI::Attach() { | 667 void MessageLoopForUI::Attach() { |
668 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); | 668 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); |
669 } | 669 } |
670 #endif | 670 #endif |
671 | 671 |
672 #if !defined(OS_NACL) && (defined(TOOLKIT_GTK) || \ | 672 #if !defined(OS_NACL) && defined(OS_WIN) |
673 defined(OS_WIN) || defined(USE_X11)) | |
674 void MessageLoopForUI::AddObserver(Observer* observer) { | 673 void MessageLoopForUI::AddObserver(Observer* observer) { |
675 pump_ui()->AddObserver(observer); | 674 pump_ui()->AddObserver(observer); |
676 } | 675 } |
677 | 676 |
678 void MessageLoopForUI::RemoveObserver(Observer* observer) { | 677 void MessageLoopForUI::RemoveObserver(Observer* observer) { |
679 pump_ui()->RemoveObserver(observer); | 678 pump_ui()->RemoveObserver(observer); |
680 } | 679 } |
681 #endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) | 680 #endif // !defined(OS_NACL) && defined(OS_WIN) |
682 | 681 |
683 #if defined(USE_OZONE) | 682 #if defined(USE_OZONE) |
684 bool MessageLoopForUI::WatchFileDescriptor( | 683 bool MessageLoopForUI::WatchFileDescriptor( |
685 int fd, | 684 int fd, |
686 bool persistent, | 685 bool persistent, |
687 MessagePumpLibevent::Mode mode, | 686 MessagePumpLibevent::Mode mode, |
688 MessagePumpLibevent::FileDescriptorWatcher *controller, | 687 MessagePumpLibevent::FileDescriptorWatcher *controller, |
689 MessagePumpLibevent::Watcher *delegate) { | 688 MessagePumpLibevent::Watcher *delegate) { |
690 return pump_libevent()->WatchFileDescriptor( | 689 return pump_libevent()->WatchFileDescriptor( |
691 fd, | 690 fd, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 fd, | 738 fd, |
740 persistent, | 739 persistent, |
741 mode, | 740 mode, |
742 controller, | 741 controller, |
743 delegate); | 742 delegate); |
744 } | 743 } |
745 | 744 |
746 #endif | 745 #endif |
747 | 746 |
748 } // namespace base | 747 } // namespace base |
OLD | NEW |