Chromium Code Reviews| Index: base/message_loop/message_pump_mac.h |
| diff --git a/base/message_loop/message_pump_mac.h b/base/message_loop/message_pump_mac.h |
| index 748b26591f0403baaaa88fc9ad070135c8565f3b..3fb9db33c3ab6c15dffcb7083652a01367617ef8 100644 |
| --- a/base/message_loop/message_pump_mac.h |
| +++ b/base/message_loop/message_pump_mac.h |
| @@ -36,6 +36,8 @@ |
| #include <CoreFoundation/CoreFoundation.h> |
| +#include "base/memory/weak_ptr.h" |
| + |
| #if !defined(__OBJC__) |
| class NSAutoreleasePool; |
| #else // !defined(__OBJC__) |
| @@ -57,6 +59,7 @@ class NSAutoreleasePool; |
| namespace base { |
| +class MessagePumpInstrumentation; |
| class RunLoop; |
| class TimeTicks; |
| @@ -93,6 +96,11 @@ class MessagePumpCFRunLoopBase : public MessagePump { |
| // objects autoreleased by work to fall into the current autorelease pool. |
| virtual NSAutoreleasePool* CreateAutoreleasePool(); |
| + // Enables instrumentation of the MessagePump. See MessagePumpInstrumentation |
| + // in the implementation for details. |
| + void EnableInstrumentation(); |
| + WeakPtr<MessagePumpInstrumentation> instrumentation_; |
| + |
| private: |
| // Timer callback scheduled by ScheduleDelayedWork. This does not do any |
| // work, but it signals work_source_ so that delayed work can be performed |
| @@ -106,11 +114,11 @@ class MessagePumpCFRunLoopBase : public MessagePump { |
| static void RunWorkSource(void* info); |
| bool RunWork(); |
| - // Perform idle-priority work. This is normally called by PreWaitObserver, |
| - // but is also associated with idle_work_source_. When this function |
| - // actually does perform idle work, it will resignal that source. The |
| - // static method calls the instance method; the instance method returns |
| - // true if idle work was done. |
| + // Perform idle-priority work. This is normally called by |
| + // PrePostWaitObserver, but is also associated with idle_work_source_. When |
| + // this function actually does perform idle work, it will resignal that |
| + // source. The static method calls the instance method; the instance method |
| + // returns true if idle work was done. |
| static void RunIdleWorkSource(void* info); |
| bool RunIdleWork(); |
| @@ -132,8 +140,8 @@ class MessagePumpCFRunLoopBase : public MessagePump { |
| // Observer callback responsible for performing idle-priority work, before |
| // the run loop goes to sleep. Associated with idle_work_observer_. |
| - static void PreWaitObserver(CFRunLoopObserverRef observer, |
| - CFRunLoopActivity activity, void* info); |
| + static void PrePostWaitObserver(CFRunLoopObserverRef observer, |
|
jar (doing other things)
2013/08/22 23:03:39
This name seems worse than the original. What sem
Robert Sesek
2013/08/23 16:58:24
It matches the EnterExit observer that's already p
|
| + CFRunLoopActivity activity, void* info); |
| // Observer callback called before the run loop processes any sources. |
| // Associated with pre_source_observer_. |