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

Unified Diff: base/message_loop/message_pump_mac.h

Issue 2709813003: [Mac] Reduce timer CPU use in MessagePumpCFRunLoopBase. (Closed)
Patch Set: Created 3 years, 10 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_mac.h
diff --git a/base/message_loop/message_pump_mac.h b/base/message_loop/message_pump_mac.h
index 14b8377b9086b922eacd82765e54d68ae2ef74fa..6780c47e3de9e079597b0c72dd69f529b7fecd65 100644
--- a/base/message_loop/message_pump_mac.h
+++ b/base/message_loop/message_pump_mac.h
@@ -81,6 +81,8 @@ typedef NSAutoreleasePool AutoreleasePoolType;
class MessagePumpCFRunLoopBase : public MessagePump {
// Needs access to CreateAutoreleasePool.
friend class MessagePumpScopedAutoreleasePool;
+ friend class TestMessagePumpCFRunLoopBase;
+
public:
MessagePumpCFRunLoopBase();
~MessagePumpCFRunLoopBase() override;
@@ -194,6 +196,10 @@ class MessagePumpCFRunLoopBase : public MessagePump {
base::TimerSlack timer_slack_;
+ // True if private API for validating/invalidating CFRunLoopTimers is
+ // available for use.
+ bool can_invalidate_timers_;
+
// The recursion depth of the currently-executing CFRunLoopRun loop on the
// run loop's thread. 0 if no run loops are running inside of whatever scope
// the object was created in.

Powered by Google App Engine
This is Rietveld 408576698