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

Side by Side Diff: message_loop/message_loop.h

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 | « no previous file | message_loop/message_loop.cc » ('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 #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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) 596 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB))
597 // Please see MessagePumpLibevent for definition. 597 // Please see MessagePumpLibevent for definition.
598 bool WatchFileDescriptor( 598 bool WatchFileDescriptor(
599 int fd, 599 int fd,
600 bool persistent, 600 bool persistent,
601 MessagePumpLibevent::Mode mode, 601 MessagePumpLibevent::Mode mode,
602 MessagePumpLibevent::FileDescriptorWatcher* controller, 602 MessagePumpLibevent::FileDescriptorWatcher* controller,
603 MessagePumpLibevent::Watcher* delegate); 603 MessagePumpLibevent::Watcher* delegate);
604 #endif 604 #endif
605
606 #if defined(USE_X11)
607 // Please see MessagePumpLibevent for definition.
608 void SetEventSource(MessagePumpLibevent::EventSource* event_source);
609 void ClearEventSource();
610 #endif
605 }; 611 };
606 612
607 // Do not add any member variables to MessageLoopForUI! This is important b/c 613 // Do not add any member variables to MessageLoopForUI! This is important b/c
608 // MessageLoopForUI is often allocated via MessageLoop(TYPE_UI). Any extra 614 // MessageLoopForUI is often allocated via MessageLoop(TYPE_UI). Any extra
609 // data that you need should be stored on the MessageLoop's pump_ instance. 615 // data that you need should be stored on the MessageLoop's pump_ instance.
610 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI), 616 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
611 MessageLoopForUI_should_not_have_extra_member_variables); 617 MessageLoopForUI_should_not_have_extra_member_variables);
612 618
613 #endif // !defined(OS_NACL) 619 #endif // !defined(OS_NACL)
614 620
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 693
688 // Do not add any member variables to MessageLoopForIO! This is important b/c 694 // Do not add any member variables to MessageLoopForIO! This is important b/c
689 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 695 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
690 // data that you need should be stored on the MessageLoop's pump_ instance. 696 // data that you need should be stored on the MessageLoop's pump_ instance.
691 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 697 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
692 MessageLoopForIO_should_not_have_extra_member_variables); 698 MessageLoopForIO_should_not_have_extra_member_variables);
693 699
694 } // namespace base 700 } // namespace base
695 701
696 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 702 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698