PAX O2 deploys on most aircraft automatically when the cabin altitude climbs above 14000 feet. For smoke, it can be deployed manually, but I just checked and the A320 series QRH does not have PAX O2 to be deployed for smoke - only for volcanic ash.The flight crew and the flight attendants all have personal PBE hoods for fire fighting (shielded for smoke, with a short supply of O2).
It wouldn't surprise me if on the B777 it was totally automatic, perhaps getting data from redundant dual Air Data Computers or something similar to know and cross check what altitude the a/c is at and if it should deploy, but I also wouldn't be surprised to learn it could be disabled and/or controlled manually.