Sexual harassment and all “sex” crimes are about power and abuse of power imbalances. If you are in a public space with a person you are largely comfortable with or even like and they make a (acceptable for a public place) sexual move on you, that is not sexual harassment, in part because there is not an inherent imbalance of power. It’s a different thing if he crabbed her breast or crotch without consent or intimidated her in some way. It’s also a different thing if she pushed his hand away or got immediately stiff and rigid and he just kept it there anyhow or put it back after being pushed away. Your friend was no doubt also putting out a variety of signals, both verbal and non-verbal, that his attentions were welcomed.
This is not rocket science people — it’s not confusing in the least. It all comes down to intent. If your intent is to act like a mature adult with another person you see as a human being, then you are no doubt going to be just fine. If on the other hand, you are trying to dominate someone in a vulnerable position using sex as weapon, you are a sexual harasser.