| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); | 658 static_cast<MessagePumpForUI*>(pump_.get())->Start(this); |
| 659 } | 659 } |
| 660 #endif | 660 #endif |
| 661 | 661 |
| 662 #if defined(OS_IOS) | 662 #if defined(OS_IOS) |
| 663 void MessageLoopForUI::Attach() { | 663 void MessageLoopForUI::Attach() { |
| 664 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); | 664 static_cast<MessagePumpUIApplication*>(pump_.get())->Attach(this); |
| 665 } | 665 } |
| 666 #endif | 666 #endif |
| 667 | 667 |
| 668 #if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) | 668 #if !defined(OS_NACL) && (defined(TOOLKIT_GTK) || defined(USE_OZONE) || \ |
| 669 defined(OS_WIN) || defined(USE_X11)) |
| 669 void MessageLoopForUI::AddObserver(Observer* observer) { | 670 void MessageLoopForUI::AddObserver(Observer* observer) { |
| 670 pump_ui()->AddObserver(observer); | 671 pump_ui()->AddObserver(observer); |
| 671 } | 672 } |
| 672 | 673 |
| 673 void MessageLoopForUI::RemoveObserver(Observer* observer) { | 674 void MessageLoopForUI::RemoveObserver(Observer* observer) { |
| 674 pump_ui()->RemoveObserver(observer); | 675 pump_ui()->RemoveObserver(observer); |
| 675 } | 676 } |
| 676 | |
| 677 #endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) | 677 #endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) |
| 678 | 678 |
| 679 //------------------------------------------------------------------------------ | 679 //------------------------------------------------------------------------------ |
| 680 // MessageLoopForIO | 680 // MessageLoopForIO |
| 681 | 681 |
| 682 #if defined(OS_WIN) | 682 #if defined(OS_WIN) |
| 683 | 683 |
| 684 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { | 684 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { |
| 685 pump_io()->RegisterIOHandler(file, handler); | 685 pump_io()->RegisterIOHandler(file, handler); |
| 686 } | 686 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 fd, | 719 fd, |
| 720 persistent, | 720 persistent, |
| 721 mode, | 721 mode, |
| 722 controller, | 722 controller, |
| 723 delegate); | 723 delegate); |
| 724 } | 724 } |
| 725 | 725 |
| 726 #endif | 726 #endif |
| 727 | 727 |
| 728 } // namespace base | 728 } // namespace base |
| OLD | NEW |