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

Unified Diff: base/message_loop/message_pump.h

Issue 22911026: Add instrumentation to the MessagePumpMac family of classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: base/message_loop/message_pump.h
diff --git a/base/message_loop/message_pump.h b/base/message_loop/message_pump.h
index 0ebba3a3e60ccfd07abb2808e2632a254a76747c..6af4a237819c9ef8aff7b8baff88563f362cd7c5 100644
--- a/base/message_loop/message_pump.h
+++ b/base/message_loop/message_pump.h
@@ -6,10 +6,12 @@
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_
#include "base/base_export.h"
+#include "base/basictypes.h"
#include "base/threading/non_thread_safe.h"
namespace base {
+class TimeDelta;
class TimeTicks;
class BASE_EXPORT MessagePump : public NonThreadSafe {
@@ -39,6 +41,12 @@ class BASE_EXPORT MessagePump : public NonThreadSafe {
// Called from within Run just before the message pump goes to sleep.
// Returns true to indicate that idle work was done.
virtual bool DoIdleWork() = 0;
+
+ // Via the two optional out pointers, returns the length of the Delegate's
+ // work queue and the length of time that the first item in the queue has
+ // been waiting to run.
+ virtual void GetQueueingInformation(size_t* queue_count,
+ TimeDelta* queueing_delay) {}
};
MessagePump();

Powered by Google App Engine
This is Rietveld 408576698