Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: message_loop/message_loop.cc

Issue 1921183002: Add a mechanism to extend a libevent based message pump. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@master
Patch Set: added test case Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « message_loop/message_loop.h ('k') | message_loop/message_pump_libevent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 MessagePumpLibevent::Watcher *delegate) { 701 MessagePumpLibevent::Watcher *delegate) {
702 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor( 702 return static_cast<MessagePumpLibevent*>(pump_.get())->WatchFileDescriptor(
703 fd, 703 fd,
704 persistent, 704 persistent,
705 mode, 705 mode,
706 controller, 706 controller,
707 delegate); 707 delegate);
708 } 708 }
709 #endif 709 #endif
710 710
711 #if defined(USE_X11)
712 void MessageLoopForUI::SetEventSource(
713 MessagePumpLibevent::EventSource* event_source) {
714 static_cast<MessagePumpLibevent*>(pump_.get())->SetEventSource(event_source);
715 }
716
717 void MessageLoopForUI::ClearEventSource() {
718 static_cast<MessagePumpLibevent*>(pump_.get())->ClearEventSource();
719 }
720 #endif
721
711 #endif // !defined(OS_NACL) 722 #endif // !defined(OS_NACL)
712 723
713 //------------------------------------------------------------------------------ 724 //------------------------------------------------------------------------------
714 // MessageLoopForIO 725 // MessageLoopForIO
715 726
716 #if !defined(OS_NACL_SFI) 727 #if !defined(OS_NACL_SFI)
717 void MessageLoopForIO::AddIOObserver( 728 void MessageLoopForIO::AddIOObserver(
718 MessageLoopForIO::IOObserver* io_observer) { 729 MessageLoopForIO::IOObserver* io_observer) {
719 ToPumpIO(pump_.get())->AddIOObserver(io_observer); 730 ToPumpIO(pump_.get())->AddIOObserver(io_observer);
720 } 731 }
(...skipping 26 matching lines...) Expand all
747 persistent, 758 persistent,
748 mode, 759 mode,
749 controller, 760 controller,
750 delegate); 761 delegate);
751 } 762 }
752 #endif 763 #endif
753 764
754 #endif // !defined(OS_NACL_SFI) 765 #endif // !defined(OS_NACL_SFI)
755 766
756 } // namespace base 767 } // namespace base
OLDNEW
« no previous file with comments | « message_loop/message_loop.h ('k') | message_loop/message_pump_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698