Federer will return to action at the Halle Open next week, where he will attempt to win the ATP 500 event for a tenth time.
The Swiss star suffered a shock defeat to Borna Coric in the final last year so is desperate to regain his crown.
The Halle Open is the only tournament in which Federer has signed a lifetime contract, meaning he always uses the German competition as his final preparations before Wimbledon.
Federer will only stop playing the event when he decides to call time on his illustrious career.
And Weber has revealed they have spoke about a possible retirement.
“He once told me that he will make that dependent on his health and physical shape,” Weber told westfalen-blatt.de.
“As long as Roger feels that he can win titles and beat the big ones, I do not think he will stop overnight.
“That’s why I think he’ll be back in 2020, but maybe in 2021.”
If Federer is to play three more Halle Opens he will turn 40 years old a few months later.
The 20-time Grand Slam winner will then be offered a non-playing position.
“There will definitely be another collaboration,” Weber added.
“Roger and his manager have already confirmed that to me.
“But what is possible, you have to discuss in peace, when the time comes.
“I also imagine topics that go far beyond a show fight.
“It would, of course, be the best that could happen to us if we could, in any way, integrate it for the future in the long term.”
Federer will head into the Halle Open in top form having reached the French Open semi-finals last week.