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

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

Issue 1222013004: Revert of Don't peek messages in the MessagePumpForUI class when we receive our kMsgHaveWork message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | base/message_loop/incoming_task_queue.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_INCOMING_TASK_QUEUE_H_ 5 #ifndef BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ 6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/pending_task.h" 10 #include "base/pending_task.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // require high resolution timers. 50 // require high resolution timers.
51 int ReloadWorkQueue(TaskQueue* work_queue); 51 int ReloadWorkQueue(TaskQueue* work_queue);
52 52
53 // Disconnects |this| from the parent message loop. 53 // Disconnects |this| from the parent message loop.
54 void WillDestroyCurrentMessageLoop(); 54 void WillDestroyCurrentMessageLoop();
55 55
56 // This should be called when the message loop becomes ready for 56 // This should be called when the message loop becomes ready for
57 // scheduling work. 57 // scheduling work.
58 void StartScheduling(); 58 void StartScheduling();
59 59
60 // Returns the delay for the most recently added task.
61 TimeTicks GetNewlyAddedTaskDelay();
62
63 private: 60 private:
64 friend class RefCountedThreadSafe<IncomingTaskQueue>; 61 friend class RefCountedThreadSafe<IncomingTaskQueue>;
65 virtual ~IncomingTaskQueue(); 62 virtual ~IncomingTaskQueue();
66 63
67 // Calculates the time at which a PendingTask should run. 64 // Calculates the time at which a PendingTask should run.
68 TimeTicks CalculateDelayedRuntime(TimeDelta delay); 65 TimeTicks CalculateDelayedRuntime(TimeDelta delay);
69 66
70 // Adds a task to |incoming_queue_|. The caller retains ownership of 67 // Adds a task to |incoming_queue_|. The caller retains ownership of
71 // |pending_task|, but this function will reset the value of 68 // |pending_task|, but this function will reset the value of
72 // |pending_task->task|. This is needed to ensure that the posting call stack 69 // |pending_task->task|. This is needed to ensure that the posting call stack
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // False until StartScheduling() is called. 102 // False until StartScheduling() is called.
106 bool is_ready_for_scheduling_; 103 bool is_ready_for_scheduling_;
107 104
108 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue); 105 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue);
109 }; 106 };
110 107
111 } // namespace internal 108 } // namespace internal
112 } // namespace base 109 } // namespace base
113 110
114 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ 111 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/incoming_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698