Split WebWidgetClient setting out of WebView::Create().

Add WebView::SetWebWidgetClient() that is called before setting up the
main frame and attaching it to the view. TODOs are sprinkled around as
what we should do in follow-ups.

Callers other than RenderViewImpl move the SetWebWidgetClient to be
called after initializing the WebView, but before making the main
frame. Next should be to remove SetWebWidgetClient calls from all
these places and move it to where RenderViewImpl attaches the
WebFrameWidget to the RenderWidget.

Then, RenderWidget::Init() should be moved to be after the attachment
of the main frame, and at that point RenderWidget will always have a
WebFrameWidget (instead of WebView as a WebWidget), except when the
RenderWidget is frozen (the main frame is remote).

Last, we then want to remove the SetWebWidgetClient calls (or reset
it to null) when the main frame is remote, but CloseWidgetSoon goes
through WebWidgetClient and should go through WebViewClient instead,
so a TODO is added. There may be more cases like this.

R=dcheng@chromium.org
TBR=dcheng

Change-Id: Id6b9d85501c4bf5a3cdfc3106b6bb18656a7c11f
Bug: 912193
Reviewed-on: https://chromium-review.googlesource.com/c/1406195
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623264}
13 files changed