No.
If your battery is completely drained, it will not charge while the device is turned off. However, if your laptop or phone has at least some juice, you can make use of any spare power in the battery to satisfy current needs (such as by using Chrome). If you’re working with a low-to-moderate level of charge on your battery and need to keep it running for long enough that would otherwise deplete its charge, I suggest turning it off when possible – this will help maximize how much time you have available before needing to recharge.