Codegen support for resource methods

TBR=sgjesse

Review URL: https://codereview.chromium.org//390333003