Macbooks already have this: it's called the keyboard and it "slides over the lens" when you close the laptop when it's not in use. Much easier to do automatically than remember to slide a 'door' across. Or do people really leave their laptops open when not in use?