powerd exports a "SetIsProjecting" D-Bus method that Chrome's ash::ProjectingObserver class calls when displays are connected or disconnected or casting sessions start or stop.
When we're "projecting", powerd enters "docked mode": the lid-closed policy is set to "do nothing" so the system will stay awake if the user closes the lid.
The name is a historical accident and doesn't make much sense any more: "projecting" actually means "the system has more than one display or ongoing cast session, and also has at least one internal display".
I think it'd be clearer if powerd instead exported an UpdateConnectedDisplays or maybe UpdateDisplayInfo method with the following fields:
optional bool has_internal_display = 1;
optional int32 num_displays = 2;
optional int32 num_casting_sessions = 3;
Internally, powerd would still do the same thing as before; it'd just instead look at has_internal_display && (num_displays + num_casting_sessions > 1).