Apple (NASDAQ:AAPL) CEO Tim Cook recently accused Web-based search and social companies of "gobbling up everything they can learn about you and trying to monetize it" with ads.

Shortly after Cook gave that blistering speech, Apple revealed how serious it is about killing targeted ads. At WWDC, Apple quietly introduced a new application programming interface that lets developers create ad-blocking extensions for the iOS 9 version of Safari.

In the past, third-party ad blockers such as Eyeo's AdBlock Plus worked on the desktop version of Safari, but they couldn't block ads on iPhones and iPads. Safari accounts for over a third of smartphone and tablet browsers worldwide, according to Net Market Share.

Source: Apple.

A recent survey by PageFair found that 28% of American Internet users already use Eyeo's AdBlock Plus. If Apple nurtures that growth by inviting ad blockers to jump on iPhones and iPads, it could seriously hurt Google (NASDAQ:GOOG) (NASDAQ:GOOGL), which relies heavily on iOS devices for mobile ad revenue.

Why it's a brilliant move by Apple
Unlike Google, Apple doesn't generate much ad revenue. Research firm eMarketer estimates that Apple's ad business, iAd, accounted for just 0.3% of its top line last year. iAd doesn't sell ads for websites, the way Google does. Instead, it lets developers embed ads into mobile apps or iTunes Radio.

Therefore, killing display ads on mobile versions of Safari won't hurt Apple at all. Instead, data costs will decline, pages will load faster, and battery life will improve. Eyeo, which recently released an ad-blocking browser on Android, claims that loading mobile ads can consume up to 23% of a mobile device's battery.

Ad blockers are a thorn in Google's side. PageFair estimates that the use of AdBlock Plus on PCs cost Google $887 million in potential ad revenue in 2012. That's why Google started paying Eyeo to "whitelist" some of its less-intrusive ads. The Financial Times claims that Google and other advertisers pay Eyeo 30% of the ad revenue that they would have lost if the ads had remained blocked.

Once developers launch ad-blocking extensions for mobile Safari, they could similarly hold Google's ads "hostage" or cripple its ability to monetize iOS users. It would be tempting for Apple to simply add an option to turn off all ads on Safari, but that would probably expose it to plenty of lawsuits from advertisers.

How badly will this hurt Google?
In 2014, Google generated a whopping 75% of its mobile ad revenue from iOS, according to Goldman Sachs. That means business from Apple's mobile devices accounted for nearly 14% of Google's top line.

Source: Pixabay.

Half of that total comes from a deal that makes Google the default search engine for mobile Safari. Google reportedly pays Apple $1 billion to $2 billion annually to hold that spot, but rumors indicate that Apple may soon dump Google for Microsoft Bing on Safari. That wouldn't be surprising, since Apple already did the same thing with Siri and Spotlight Search. Once Apple enables ad-blocking on mobile Safari and ditches Google as the default search engine, Google's top line could take a big hit.

Yet Google arguably forced Apple's hand by expanding too deeply into the iOS walled garden with ecosystem apps such as Google Maps, YouTube, Drive, and Google Now. That expansion pressured Apple to launch its own competing services, such as Apple Maps, to prevent its users from being tightly tethered to Google services.

Google's nightmare has just begun
Google is facing a crucial turning point in its business. Its traditional display ads are falling out of favor, and it's losing ground to Facebook in mobile display ads.

eMarketer estimates that Facebook generated more than three times as much mobile display ad revenue as Google in the U.S. last year.  Facebook's News Feed is a more streamlined place to view ads than Google's scattered ad network. Facebook's mobile ads are also practically immune to ad blockers, since they're contained within apps instead of mobile websites.

The rise of ad blockers hasn't crippled Google yet, but Apple's involvement could be a game-changer when iOS 9 arrives later this year. But it's not just Google that needs to watch its back -- any company that relies too heavily on online advertising should beware.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.