For the purposes of this chapter, “contractor” and “subcontractor” include a contractor, subcontractor, licensee, officer, agent, or representative thereof, acting in that capacity, when working on public works pursuant to this article and Article 2 (commencing with Section 1770).