Commit 18fbf5cd authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Remove Timer usages from ScrollableAreaMac

This is the counterpart for Mac of https://chromium-review.googlesource.com/c/chromium/src/+/923875

This is part of efforts to replace default timer task runners with
other appropriate task runners in the renderer.

Bug: 624694, 804694
Change-Id: I9d3696671e71c44dff39da0c50c0a4b8e112e737
Reviewed-on: https://chromium-review.googlesource.com/925880Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537752}
parent 4858ec96
......@@ -299,7 +299,12 @@ class BlinkScrollbarPartAnimationTimer {
public:
BlinkScrollbarPartAnimationTimer(BlinkScrollbarPartAnimation* animation,
CFTimeInterval duration)
: timer_(this, &BlinkScrollbarPartAnimationTimer::TimerFired),
: timer_(Platform::Current()
->MainThread()
->Scheduler()
->CompositorTaskRunner(),
this,
&BlinkScrollbarPartAnimationTimer::TimerFired),
start_time_(0.0),
duration_(duration),
animation_(animation),
......@@ -333,7 +338,7 @@ class BlinkScrollbarPartAnimationTimer {
[animation_ setCurrentProgress:progress];
}
Timer<BlinkScrollbarPartAnimationTimer> timer_;
TaskRunnerTimer<BlinkScrollbarPartAnimationTimer> timer_;
double start_time_; // In seconds.
double duration_; // In seconds.
BlinkScrollbarPartAnimation* animation_; // Weak, owns this.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment