Home
last modified time | relevance | path

Searched refs:MessageLoop (Results 1 – 25 of 105) sorted by relevance

12345

/external/libchrome/base/message_loop/
Dmessage_loop.cc33 MessageLoop::MessagePumpFactory* message_pump_for_ui_factory_ = nullptr;
72 class MessageLoop::Controller : public internal::IncomingTaskQueue::Observer {
78 Controller(MessageLoop* message_loop);
110 MessageLoop* message_loop_;
122 MessageLoop::Controller::Controller(MessageLoop* message_loop) in Controller()
125 MessageLoop::Controller::~Controller() { in ~Controller()
130 void MessageLoop::Controller::WillQueueTask(PendingTask* task) { in WillQueueTask()
134 void MessageLoop::Controller::DidQueueTask(bool was_empty) { in DidQueueTask()
147 void MessageLoop::Controller::StartScheduling() { in StartScheduling()
156 void MessageLoop::Controller::DisconnectFromParent() { in DisconnectFromParent()
[all …]
Dmessage_loop_task_runner_unittest.cc26 : current_loop_(new MessageLoop()), in MessageLoopTaskRunnerTest()
58 LoopRecorder(MessageLoop** run_on, in LoopRecorder()
59 MessageLoop** deleted_on, in LoopRecorder()
65 void RecordRun() { *run_on_ = MessageLoop::current(); } in RecordRun()
70 *deleted_on_ = MessageLoop::current(); in ~LoopRecorder()
74 MessageLoop** run_on_;
75 MessageLoop** deleted_on_;
94 std::unique_ptr<MessageLoop> current_loop_;
104 MessageLoop* task_run_on = nullptr; in TEST_F()
105 MessageLoop* task_deleted_on = nullptr; in TEST_F()
[all …]
Dmessage_loop_current.cc18 base::ThreadLocalPointer<MessageLoop>* GetTLSMessageLoop() { in GetTLSMessageLoop()
19 static NoDestructor<ThreadLocalPointer<MessageLoop>> lazy_tls_ptr; in GetTLSMessageLoop()
103 void MessageLoopCurrent::BindToCurrentThreadInternal(MessageLoop* current) { in BindToCurrentThreadInternal()
110 void MessageLoopCurrent::UnbindFromCurrentThreadInternal(MessageLoop* current) { in UnbindFromCurrentThreadInternal()
116 MessageLoop* message_loop) { in IsBoundToCurrentThreadInternal()
127 MessageLoop* loop = GetTLSMessageLoop()->Get(); in Get()
130 DCHECK(loop->IsType(MessageLoop::TYPE_UI) || in Get()
131 loop->IsType(MessageLoop::TYPE_JAVA)); in Get()
133 DCHECK(loop->IsType(MessageLoop::TYPE_UI)); in Get()
142 MessageLoop* loop = GetTLSMessageLoop()->Get(); in IsSet()
[all …]
Dmessage_loop.h86 class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
129 explicit MessageLoop(Type type = TYPE_DEFAULT);
132 explicit MessageLoop(std::unique_ptr<MessagePump> pump);
134 ~MessageLoop() override;
216 MessageLoop(Type type, MessagePumpFactoryCallback pump_factory);
245 static std::unique_ptr<MessageLoop> CreateUnbound(
344 DISALLOW_COPY_AND_ASSIGN(MessageLoop);
359 class BASE_EXPORT MessageLoopForUI : public MessageLoop {
398 static_assert(sizeof(MessageLoop) == sizeof(MessageLoopForUI),
413 class BASE_EXPORT MessageLoopForIO : public MessageLoop {
[all …]
Dmessage_loop_unittest.cc201 class DummyTaskObserver : public MessageLoop::TaskObserver {
414 MessageLoop message_loop(MessageLoop::TYPE_UI); in RunTest_PostDelayedTask_SharedTimer_SubPump()
526 void RunTest_RecursiveDenial2(MessageLoop::Type message_loop_type) { in RunTest_RecursiveDenial2()
527 MessageLoop loop(message_loop_type); in RunTest_RecursiveDenial2()
566 void RunTest_RecursiveSupport2(MessageLoop::Type message_loop_type) { in RunTest_RecursiveSupport2()
567 MessageLoop loop(message_loop_type); in RunTest_RecursiveSupport2()
685 options.message_loop_type = MessageLoop::TYPE_IO; in RunTest_IOHandler()
723 options.message_loop_type = MessageLoop::TYPE_IO; in RunTest_WaitForIO()
771 MessageLoop::Type type_in, in MessageLoopTypedTestParams()
777 MessageLoop::Type type;
[all …]
Dmessage_loop_current.h19 class MessageLoop; variable
62 operator MessageLoop*() const { return current_; }
162 MessageLoop* const loop_;
176 static void BindToCurrentThreadInternal(MessageLoop* current);
181 static void UnbindFromCurrentThreadInternal(MessageLoop* current);
185 static bool IsBoundToCurrentThreadInternal(MessageLoop* message_loop);
188 explicit MessageLoopCurrent(MessageLoop* current) : current_(current) {} in MessageLoopCurrent()
190 MessageLoop* const current_;
236 MessageLoopCurrentForUI(MessageLoop* current, MessagePumpForUI* pump) in MessageLoopCurrentForUI()
287 MessageLoopCurrentForIO(MessageLoop* current, MessagePumpForIO* pump) in MessageLoopCurrentForIO()
/external/libbrillo/brillo/message_loops/
Dmessage_loop_unittest.cc48 using TaskId = MessageLoop::TaskId;
60 std::unique_ptr<MessageLoop> loop_;
81 EXPECT_FALSE(this->loop_->CancelTask(MessageLoop::kTaskIdNull)); in TYPED_TEST()
88 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); in TYPED_TEST()
108 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); in TYPED_TEST()
127 EXPECT_EQ(MessageLoop::kTaskIdNull, this->loop_->WatchFileDescriptor( in TYPED_TEST()
128 FROM_HERE, -1, MessageLoop::kWatchRead, true, in TYPED_TEST()
130 EXPECT_EQ(MessageLoop::kTaskIdNull, this->loop_->WatchFileDescriptor( in TYPED_TEST()
131 FROM_HERE, -1, MessageLoop::kWatchWrite, true, in TYPED_TEST()
141 FROM_HERE, pipe.reader, MessageLoop::kWatchRead, true, in TYPED_TEST()
[all …]
Dmessage_loop.cc17 base::LazyInstance<base::ThreadLocalPointer<MessageLoop> >::Leaky lazy_tls_ptr =
22 const MessageLoop::TaskId MessageLoop::kTaskIdNull = 0;
24 MessageLoop* MessageLoop::current() { in current()
31 bool MessageLoop::ThreadHasCurrent() { in ThreadHasCurrent()
35 void MessageLoop::SetAsCurrent() { in SetAsCurrent()
41 void MessageLoop::ReleaseFromCurrent() { in ReleaseFromCurrent()
47 MessageLoop::~MessageLoop() { in ~MessageLoop()
52 void MessageLoop::Run() { in Run()
59 void MessageLoop::BreakLoop() { in BreakLoop()
Dbase_message_loop.h31 class BRILLO_EXPORT BaseMessageLoop : public MessageLoop {
46 using MessageLoop::PostDelayedTask;
52 using MessageLoop::WatchFileDescriptor;
75 void OnRanPostedTask(MessageLoop::TaskId task_id);
81 void OnFileReadyPostedTask(MessageLoop::TaskId task_id);
92 MessageLoop::TaskId task_id;
100 MessageLoop::TaskId task_id,
132 MessageLoop::TaskId task_id_;
163 std::map<MessageLoop::TaskId, DelayedTask> delayed_tasks_;
166 std::map<MessageLoop::TaskId, IOTask> io_tasks_;
[all …]
Dfake_message_loop.h32 class BRILLO_EXPORT FakeMessageLoop : public MessageLoop {
42 using MessageLoop::PostDelayedTask;
48 using MessageLoop::WatchFileDescriptor;
72 std::map<MessageLoop::TaskId, ScheduledTask> tasks_;
78 std::pair<base::Time, MessageLoop::TaskId>,
79 std::vector<std::pair<base::Time, MessageLoop::TaskId>>,
80 std::greater<std::pair<base::Time, MessageLoop::TaskId>>> fire_order_;
84 std::multimap<std::pair<int, WatchMode>, MessageLoop::TaskId> fds_watched_;
92 MessageLoop::TaskId last_id_ = kTaskIdNull;
Dbase_message_loop.cc50 CHECK(!base::MessageLoop::current()) in BaseMessageLoop()
84 MessageLoop::TaskId BaseMessageLoop::PostDelayedTask( in PostDelayedTask()
98 return MessageLoop::kTaskIdNull; in PostDelayedTask()
105 MessageLoop::TaskId BaseMessageLoop::WatchFileDescriptor( in WatchFileDescriptor()
113 return MessageLoop::kTaskIdNull; in WatchFileDescriptor()
117 case MessageLoop::kWatchRead: in WatchFileDescriptor()
120 case MessageLoop::kWatchWrite: in WatchFileDescriptor()
124 return MessageLoop::kTaskIdNull; in WatchFileDescriptor()
138 << (mode == MessageLoop::kWatchRead ? "reading" : "writing") in WatchFileDescriptor()
145 return MessageLoop::kTaskIdNull; in WatchFileDescriptor()
[all …]
Dfake_message_loop_unittest.cc26 using TaskId = MessageLoop::TaskId;
43 EXPECT_FALSE(loop_->CancelTask(MessageLoop::kTaskIdNull)); in TEST_F()
95 FROM_HERE, fd, MessageLoop::kWatchRead, false, in TEST_F()
97 EXPECT_NE(MessageLoop::kTaskIdNull, task_id); in TEST_F()
99 EXPECT_NE(MessageLoop::kTaskIdNull, in TEST_F()
103 EXPECT_NE(MessageLoop::kTaskIdNull, in TEST_F()
110 loop_->SetFileDescriptorReadiness(fd, MessageLoop::kWatchRead, true); in TEST_F()
Dmessage_loop.h17 class BRILLO_EXPORT MessageLoop {
19 virtual ~MessageLoop();
32 static MessageLoop* current();
123 MessageLoop() = default;
130 DISALLOW_COPY_AND_ASSIGN(MessageLoop);
Dfake_message_loop.cc16 MessageLoop::TaskId FakeMessageLoop::PostDelayedTask( in PostDelayedTask()
25 MessageLoop::TaskId current_id = ++last_id_; in PostDelayedTask()
36 MessageLoop::TaskId FakeMessageLoop::WatchFileDescriptor( in WatchFileDescriptor()
42 MessageLoop::TaskId current_id = ++last_id_; in WatchFileDescriptor()
51 if (task_id == MessageLoop::kTaskIdNull) in CancelTask()
76 << (fd_mode.second == MessageLoop::kWatchRead ? "reading" : "writing") in RunOnce()
/external/libchrome/base/timer/
Dtimer_unittest.cc37 const MessageLoop::Type testing_message_loops[] = {
38 MessageLoop::TYPE_DEFAULT, MessageLoop::TYPE_IO,
40 MessageLoop::TYPE_UI,
202 void RunTest_OneShotTimers(MessageLoop::Type message_loop_type) { in RunTest_OneShotTimers()
203 MessageLoop loop(message_loop_type); in RunTest_OneShotTimers()
218 void RunTest_OneShotTimers_Cancel(MessageLoop::Type message_loop_type) { in RunTest_OneShotTimers_Cancel()
219 MessageLoop loop(message_loop_type); in RunTest_OneShotTimers_Cancel()
239 void RunTest_OneShotSelfDeletingTimer(MessageLoop::Type message_loop_type) { in RunTest_OneShotSelfDeletingTimer()
240 MessageLoop loop(message_loop_type); in RunTest_OneShotSelfDeletingTimer()
247 void RunTest_RepeatingTimer(MessageLoop::Type message_loop_type, in RunTest_RepeatingTimer()
[all …]
/external/libbrillo/brillo/streams/
Dfile_stream.cc87 MessageLoop::current()->CancelTask(read_watcher_); in WaitForData()
88 read_watcher_ = MessageLoop::current()->WatchFileDescriptor( in WaitForData()
91 MessageLoop::WatchMode::kWatchRead, in WaitForData()
95 if (read_watcher_ == MessageLoop::kTaskIdNull) { in WaitForData()
105 MessageLoop::current()->CancelTask(write_watcher_); in WaitForData()
106 write_watcher_ = MessageLoop::current()->WatchFileDescriptor( in WaitForData()
109 MessageLoop::WatchMode::kWatchWrite, in WaitForData()
113 if (write_watcher_ == MessageLoop::kTaskIdNull) { in WaitForData()
158 if (read_watcher_ != MessageLoop::kTaskIdNull) { in CancelPendingAsyncOperations()
159 MessageLoop::current()->CancelTask(read_watcher_); in CancelPendingAsyncOperations()
[all …]
/external/libchrome/base/threading/
Dthread.cc43 Thread::Options::Options(MessageLoop::Type type, size_t size) in Options()
73 options.message_loop_type = MessageLoop::TYPE_UI; in Start()
86 (options.message_loop_type == MessageLoop::TYPE_UI)); in StartWithOptions()
95 MessageLoop::Type type = options.message_loop_type; in StartWithOptions()
97 type = MessageLoop::TYPE_CUSTOM; in StartWithOptions()
100 std::unique_ptr<MessageLoop> message_loop_owned = in StartWithOptions()
101 MessageLoop::CreateUnbound(type, options.message_pump_factory); in StartWithOptions()
272 void Thread::SetMessageLoop(MessageLoop* message_loop) { in SetMessageLoop()
303 std::unique_ptr<MessageLoop> message_loop(message_loop_); in ThreadMain()
351 if (message_loop->type() != MessageLoop::TYPE_CUSTOM) { in ThreadMain()
Dthread.h65 Options(MessageLoop::Type type, size_t size);
71 MessageLoop::Type message_loop_type = MessageLoop::TYPE_DEFAULT;
202 MessageLoop* message_loop() const { in message_loop()
277 void SetMessageLoop(MessageLoop* message_loop);
327 MessageLoop* message_loop_ = nullptr;
/external/libbrillo/brillo/
Dbinder_watcher.cc36 BinderWatcher::BinderWatcher(MessageLoop* message_loop) in BinderWatcher()
42 if (task_id_ != MessageLoop::kTaskIdNull) in ~BinderWatcher()
48 message_loop_ = MessageLoop::current(); in Init()
72 MessageLoop::kWatchRead, in Init()
75 if (task_id_ == MessageLoop::kTaskIdNull) { in Init()
Dbinder_watcher.h31 explicit BinderWatcher(MessageLoop* message_loop);
39 MessageLoop::TaskId task_id_{MessageLoop::kTaskIdNull};
40 MessageLoop* message_loop_;
Dasynchronous_signal_handler_unittest.cc60 MessageLoop::current()->Run(); in TEST_F()
76 MessageLoop::current()->Run(); in TEST_F()
85 base::Bind(&MessageLoop::BreakLoop, in TEST_F()
88 MessageLoop::current()->Run(); in TEST_F()
107 MessageLoop::current()->Run(); in TEST_F()
129 MessageLoop::current()->Run(); in TEST_F()
Dprocess_reaper_unittest.cc78 [](MessageLoop* loop, const siginfo_t& info) { in TEST_F()
95 [](MessageLoop* loop, int exit_value, int* running_children, in TEST_F()
114 [](MessageLoop* loop, const siginfo_t& info) { in TEST_F()
125 [](MessageLoop* loop, const siginfo_t& /* info */) { in TEST_F()
136 base::Bind(&MessageLoop::BreakLoop, in TEST_F()
/external/libchrome/mojo/public/java/system/
Dbase_run_loop.cc24 base::MessageLoop* message_loop = new base::MessageLoop; in JNI_BaseRunLoop_CreateBaseRunLoop()
60 reinterpret_cast<base::MessageLoop*>(runLoopID) in JNI_BaseRunLoop_PostDelayedTask()
71 base::MessageLoop* message_loop = in JNI_BaseRunLoop_DeleteMessageLoop()
72 reinterpret_cast<base::MessageLoop*>(runLoopID); in JNI_BaseRunLoop_DeleteMessageLoop()
/external/libchrome/base/test/
Dscoped_task_environment.cc32 std::unique_ptr<MessageLoop> CreateMessageLoopForMainThreadType( in CreateMessageLoopForMainThreadType()
36 return std::make_unique<MessageLoop>(MessageLoop::TYPE_DEFAULT); in CreateMessageLoopForMainThreadType()
40 return std::make_unique<MessageLoop>(MessageLoop::TYPE_UI); in CreateMessageLoopForMainThreadType()
42 return std::make_unique<MessageLoop>(MessageLoop::TYPE_IO); in CreateMessageLoopForMainThreadType()
/external/libchrome/base/task/sequence_manager/test/
Dlazy_thread_controller_for_test.cc14 : ThreadControllerImpl(MessageLoop::current(), in LazyThreadControllerForTest()
28 message_loop_ = MessageLoop::current(); in EnsureMessageLoop()
87 if (MessageLoop::current() != message_loop_) in RemoveNestingObserver()
118 if (HasMessageLoop() && MessageLoop::current() == message_loop_) in RestoreDefaultTaskRunner()

12345