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

Side by Side Diff: base/message_loop/message_loop.h

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « base/message_loop/incoming_task_queue.cc ('k') | base/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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 // Returns true if the message loop has high resolution timers enabled. 385 // Returns true if the message loop has high resolution timers enabled.
386 // Provided for testing. 386 // Provided for testing.
387 bool HasHighResolutionTasks(); 387 bool HasHighResolutionTasks();
388 388
389 // Returns true if the message loop is "idle". Provided for testing. 389 // Returns true if the message loop is "idle". Provided for testing.
390 bool IsIdleForTesting(); 390 bool IsIdleForTesting();
391 391
392 // Wakes up the message pump. Can be called on any thread. The caller is 392 // Wakes up the message pump. Can be called on any thread. The caller is
393 // responsible for synchronizing ScheduleWork() calls. 393 // responsible for synchronizing ScheduleWork() calls.
394 void ScheduleWork(bool was_empty); 394 void ScheduleWork();
395 395
396 // Returns the TaskAnnotator which is used to add debug information to posted 396 // Returns the TaskAnnotator which is used to add debug information to posted
397 // tasks. 397 // tasks.
398 debug::TaskAnnotator* task_annotator() { return &task_annotator_; } 398 debug::TaskAnnotator* task_annotator() { return &task_annotator_; }
399 399
400 // Runs the specified PendingTask. 400 // Runs the specified PendingTask.
401 void RunTask(const PendingTask& pending_task); 401 void RunTask(const PendingTask& pending_task);
402 402
403 //---------------------------------------------------------------------------- 403 //----------------------------------------------------------------------------
404 protected: 404 protected:
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 647
648 // Do not add any member variables to MessageLoopForIO! This is important b/c 648 // Do not add any member variables to MessageLoopForIO! This is important b/c
649 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 649 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
650 // data that you need should be stored on the MessageLoop's pump_ instance. 650 // data that you need should be stored on the MessageLoop's pump_ instance.
651 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 651 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
652 MessageLoopForIO_should_not_have_extra_member_variables); 652 MessageLoopForIO_should_not_have_extra_member_variables);
653 653
654 } // namespace base 654 } // namespace base
655 655
656 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ 656 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698