| 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 #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 <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 // which connects this MessageLoop to the UI thread's CFRunLoop and allows | 592 // which connects this MessageLoop to the UI thread's CFRunLoop and allows |
| 593 // PostTask() to work. | 593 // PostTask() to work. |
| 594 void Attach(); | 594 void Attach(); |
| 595 #endif | 595 #endif |
| 596 | 596 |
| 597 #if defined(OS_ANDROID) | 597 #if defined(OS_ANDROID) |
| 598 // On Android, the UI message loop is handled by Java side. So Run() should | 598 // On Android, the UI message loop is handled by Java side. So Run() should |
| 599 // never be called. Instead use Start(), which will forward all the native UI | 599 // never be called. Instead use Start(), which will forward all the native UI |
| 600 // events to the Java message loop. | 600 // events to the Java message loop. |
| 601 void Start(); | 601 void Start(); |
| 602 // In Android there are cases where we want to abort immediately without |
| 603 // calling Quit(), in these cases we call Abort(). |
| 604 void Abort(); |
| 602 #endif | 605 #endif |
| 603 | 606 |
| 604 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) | 607 #if defined(USE_OZONE) || (defined(USE_X11) && !defined(USE_GLIB)) |
| 605 // Please see MessagePumpLibevent for definition. | 608 // Please see MessagePumpLibevent for definition. |
| 606 bool WatchFileDescriptor( | 609 bool WatchFileDescriptor( |
| 607 int fd, | 610 int fd, |
| 608 bool persistent, | 611 bool persistent, |
| 609 MessagePumpLibevent::Mode mode, | 612 MessagePumpLibevent::Mode mode, |
| 610 MessagePumpLibevent::FileDescriptorWatcher* controller, | 613 MessagePumpLibevent::FileDescriptorWatcher* controller, |
| 611 MessagePumpLibevent::Watcher* delegate); | 614 MessagePumpLibevent::Watcher* delegate); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 693 |
| 691 // 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 |
| 692 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 695 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 693 // 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. |
| 694 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 697 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 695 "MessageLoopForIO should not have extra member variables"); | 698 "MessageLoopForIO should not have extra member variables"); |
| 696 | 699 |
| 697 } // namespace base | 700 } // namespace base |
| 698 | 701 |
| 699 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 702 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |