There is an app on the Mac App Store called Pause It. It allows you to play, pause, and skip pandora songs that are playing in Safari or Chrome. It also allows you to control the playback of videos on YouTube and songs on Grooveshark. I mostly use it with Pandora and it works great. It's $0.99 as of the writing of this post.
One thing to note is that it uses the function keys (F7 - F9) that share the same physical keys as the media keys on a Mac. However, function keys and media keys act separately. So for some Macs, you have to press the Fn key along with the desired media key to use the corresponding function key. However, you can change this setting in System Preferences if you go to System Preferences -> Keyboard and check "Use all F1, F2, etc. keys as standard function keys."