I'm lucky in that my bathroom is downstairs off the lounge, so i would either take him in there with me, or put him where i could see him by just peeking around the shower curtain.
His vibrating bouncer came SO in handy for those occasions.. yes sometimes he got bored, but it wasn't going to hurt him for 5 minutes while i quickly showered.
Now i just leave the door open (he's 17mo) but shut the baby gate and play peek-a-boo around the curtain with him but leave the TV on in the lounge.