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

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

Issue 1181263008: 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, 6 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 | « base/message_loop/message_loop.cc ('k') | base/message_loop/message_pump_win.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUMP_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop/timer_slack.h" 10 #include "base/message_loop/timer_slack.h"
(...skipping 24 matching lines...) Expand all
35 // indicates the time when DoDelayedWork should be called again. If 35 // indicates the time when DoDelayedWork should be called again. If
36 // |next_delayed_work_time| is null (per Time::is_null), then the queue of 36 // |next_delayed_work_time| is null (per Time::is_null), then the queue of
37 // future delayed work (timer events) is currently empty, and no additional 37 // future delayed work (timer events) is currently empty, and no additional
38 // calls to this function need to be scheduled. 38 // calls to this function need to be scheduled.
39 virtual bool DoDelayedWork(TimeTicks* next_delayed_work_time) = 0; 39 virtual bool DoDelayedWork(TimeTicks* next_delayed_work_time) = 0;
40 40
41 // Called from within Run just before the message pump goes to sleep. 41 // Called from within Run just before the message pump goes to sleep.
42 // Returns true to indicate that idle work was done. Returning false means 42 // Returns true to indicate that idle work was done. Returning false means
43 // the pump will now wait. 43 // the pump will now wait.
44 virtual bool DoIdleWork() = 0; 44 virtual bool DoIdleWork() = 0;
45
46 // Returns the delay for the newly added task.
47 virtual TimeTicks GetNewlyAddedTaskDelay() = 0;
48 }; 45 };
49 46
50 MessagePump(); 47 MessagePump();
51 virtual ~MessagePump(); 48 virtual ~MessagePump();
52 49
53 // The Run method is called to enter the message pump's run loop. 50 // The Run method is called to enter the message pump's run loop.
54 // 51 //
55 // Within the method, the message pump is responsible for processing native 52 // Within the method, the message pump is responsible for processing native
56 // messages as well as for giving cycles to the delegate periodically. The 53 // messages as well as for giving cycles to the delegate periodically. The
57 // message pump should take care to mix delegate callbacks with native 54 // message pump should take care to mix delegate callbacks with native
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // used on the thread that called Run. 123 // used on the thread that called Run.
127 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0; 124 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
128 125
129 // Sets the timer slack to the specified value. 126 // Sets the timer slack to the specified value.
130 virtual void SetTimerSlack(TimerSlack timer_slack); 127 virtual void SetTimerSlack(TimerSlack timer_slack);
131 }; 128 };
132 129
133 } // namespace base 130 } // namespace base
134 131
135 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_ 132 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/message_loop/message_pump_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698