There are a few retail games that can be activated through Steam.
But just like with any other Steam game, once that key is used thats it. It is no good anymore, and the game is permanatly tied to your account.
You may be able to contact Steam support, with a proof of purchase & key you have, they might be able to get your CoD actiavted on your account.
But it takes a while.
Retail versions of Battlefield however, can not be activated through Steam unless purchased through them.
But you can add the game to your library and it will launch the shortcut for you.
Battlefield will use EA's system. Which, if I recall works the same way as Steam does. I can't remember for sure, but I believe it uses a 1 use key, and ties the game to your EA account, like Dragon Age & Mass Effect 2 does.
EA may be able to help if you show proof of purchase & the key that was with the game as well, but like Steam, it could take a while.
At any count, I would not purchase any game if theres any possibility it was used or opened for these reasons. Without knowing the account details the key is registered to, it may not be playable at all, unless Customer Support can help.