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

Unified Diff: views/widget/aero_tooltip_manager.cc

Issue 399016: Fix race conditions where an object's constructor uses PostTask on itself. T... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« views/widget/aero_tooltip_manager.h ('K') | « views/widget/aero_tooltip_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/aero_tooltip_manager.cc
===================================================================
--- views/widget/aero_tooltip_manager.cc (revision 32148)
+++ views/widget/aero_tooltip_manager.cc (working copy)
@@ -47,7 +47,8 @@
initial_delay_ = static_cast<int>(
::SendMessage(tooltip_hwnd_, TTM_GETDELAYTIME, TTDT_INITIAL, 0));
}
- initial_timer_ = new InitialTimer(this, initial_delay_);
+ initial_timer_ = new InitialTimer(this);
+ initial_timer_->Start(initial_delay_);
} else {
// Hide the tooltip and cancel any timers.
::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0);
@@ -108,8 +109,11 @@
///////////////////////////////////////////////////////////////////////////////
// AeroTooltipManager::InitialTimer
-AeroTooltipManager::InitialTimer::InitialTimer(AeroTooltipManager* manager,
- int time) : manager_(manager) {
+AeroTooltipManager::InitialTimer::InitialTimer(AeroTooltipManager* manager)
+ : manager_(manager) {
+}
+
+void AeroTooltipManager::InitialTimer::Start(int time) {
MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod(
this, &InitialTimer::Execute), time);
}
« views/widget/aero_tooltip_manager.h ('K') | « views/widget/aero_tooltip_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698