SAN FRANCISCO — Yahoo CEO Marissa Mayer found herself in an awkward situation Thursday at the struggling Internet company’s annual conference for the makers of mobile apps.

She had to persuade an auditorium full of programmers and advertising partners that Yahoo will grow into an increasingly important player in the mobile market. This while the company is dramatically shrinking to appease restless shareholders threatening to overthrow management unless things get better.

Just before Mayer’s appearance, Yahoo tried to underscore its long-term commitment to mobile by projecting this statement on a huge screen hanging above the stage: “Imagine what the next seven years will bring.”

It’s not even clear that Yahoo will exist in its current form seven months from now, given that some of its shareholders want the company to sell its Internet operations after 3 1/2 years of declining revenue under Mayer’s leadership. Mayer and the rest of Yahoo’s board are exploring “strategic alternatives” that could include a sale while the Sunnyvale, California, company sheds 15 percent of its workforce and closes unprofitable services.

Even though she is deviating from an original turnaround plan, Mayer has steadfastly insisted that Yahoo Inc. will have a bright future after her latest overhaul.

Mayer touched upon that theme Thursday as she emphasized that that Yahoo is still investing heavily in mobile devices despite the massive cutbacks in other areas of the company.

“There is incredible potential here,” she assured the mobile developers. “Together, we can build the future of mobile.”

Unlike her appearance at Yahoo’s inaugural mobile conference last year, Mayer gave a brief presentation before leaving most of the talking to executives that joined her management team after the company bought mobile analytics service Flurry for $270 million in 2014. Mayer also didn’t hold a news conference after her onstage appearance, allowing her to avoid further questions about Yahoo’s fate.

Mayer’s job security is shaky because Yahoo’s stock has sunk by more than 40 percent since the end of 2014, reflecting Wall Street’s frustration with her inability to deliver on her promise to revive Yahoo’s revenue growth. The company’s revenue, after subtracting ad commissions, fell 7 percent last year.