The gunman, now in custody, "confessed to committing this cowardly act in the name of Islam," Philadelphia Police Commissioner Richard Ross said during a news conference.