Use pdf compositor service for printing when OOPIF is enabled

When OOPIF is enabled (by site-per-process flag or
top-document-isolation feature), use the pdf compositor service for
converting PaintRecord to PDF on renderers.

In the future, this will make compositing PDF from multiple renderers
possible.

TBR=jzfeng@chromium.org
BUG=455764

Change-Id: I3c28f03f4358e4228239fe1a33384f85e7716e8f
Reviewed-on: https://chromium-review.googlesource.com/699765
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511616}
void HeadlessWebContentsImpl::OnNeedsExternalBeginFrames(
    bool needs_begin_frames) {
  TRACE_EVENT1("headless",
               "HeadlessWebContentsImpl::OnNeedsExternalBeginFrames",
               "needs_begin_frames", needs_begin_frames);

  needs_external_begin_frames_ = needs_begin_frames;
  for (int session_id : begin_frame_events_enabled_sessions_)
    SendNeedsBeginFramesEvent(session_id);
}

void HeadlessWebContentsImpl::OnNeedsExternalBeginFrames(
    bool needs_begin_frames) {
  TRACE_EVENT1("headless",
               "HeadlessWebContentsImpl::OnNeedsExternalBeginFrames",
               "needs_begin_frames", needs_begin_frames);

  needs_external_begin_frames_ = needs_begin_frames;
  for (int session_id : begin_frame_events_enabled_sessions_)
    SendNeedsBeginFramesEvent(session_id);
}
