Plumb RenderFrameHostImpl* or RenderViewHostImpl* to every message
handler as an argument, rather than passing them as data members.

Eliminate the render_frame_message_source_, render_view_message_source_
data members. Eliminate the HasValidFrameSource() helper method.

Eliminate the combo version of OnMessageReceived that took both an RFH
or an RVH, and instead do the dispatch in the delegate
OnMessageRecieved methods. Use the _WITH_PARAM dispatch macro to
plumb the RenderFrameHostImpl into the dispatch methods.

Fix some bugs that became apparent after this refactoring:
  OnEndColorChooser: insist on rfh/rph match (via a ::Matches helper)
  OnSetSelectedColorInColorChooser: insist on rfh/rph match
  OnOpenDateTimeDialog: use |source| rather than GetRenderViewHost.
  OnEnumerateDirectory: Use the right process for permissions check
  OnRequestPpapiBrokerPermission: rename |routing_id| to reflect that
    it's not a frame or view route ID.
  SendPpapiBrokerPermissionResult: rename this from On... to
    Send..., since it's not a dispatcher. Parameterize by the
    RPH id, so that we send the response to the right process.

BUG=304341
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2563233002
Cr-Commit-Position: refs/heads/master@{#438960}
12 files changed