Remove kPrerender visibility from the renderer.

Change all PageVisibilityState enums to be just booleans of hidden or
not in the renderer side code. Prerender state is not needed any more
there for correctness. The only places that check explictly for
prerender are to generate strings, or in RenderFrameImpl in order to
pass a bool along. We can remove the former and pass along the bool
more explicitly in the latter case since RenderFrameImpl can query if
prerendering is taking place for the frame.

There are a few places that check for == kVisible or != kVisible. For
the == kVisible, prerendering is only used while the frame is not
visible per the comment being deleted in prerender_helper.h. So this
should not change behaviour as prerender == hidden from this
perspective.

For places that check == kHidden or != kHidden it could be a new
behaviour when it would have been kPrerender before:

Document::DispatchUnloadEvents() would if !kHidden then dispatch
a visibility change event. This would have occured if going to
prerender during unload. Since prerender is for pre-loading this
seems okay to not happen anymore.

LocalFrameView::ShouldSetCursor() would return true during prerender.
This is part of event handling which is after the page is transitioned
out of prerender state, so it should be okay to return false during
prerender now.

This also removes "prerender" from layout tests. Layout tests set a
prerender visibility state, which would just set to hidden internally,
and verify it works like hidden. Since prerender no longer exists in
the renderer, these tests would just be testing hidden twice, and
we can remove the prerender bits.

R=avi@chromium.org, dcheng@chromium.org, pasko@chromium.org
TBR=avi

Change-Id: I914f47f49b41cbf8080ff6271c2896c1a5dbf569
Bug: 908582
Reviewed-on: https://chromium-review.googlesource.com/c/1356120
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612849}
59 files changed