Keeping a hat on while sitting at a diner counter or bar seems acceptable, but my upbringing seems to be telling me that the difference between wearing a hat indoors and taking it off at the earliest convenience is similar to the difference between "ganksta" and a gentleman with a classic hat.