Initial VSync support and ensure we flush Wayland display every frame.

Chromium uses VSyncProvider for providing needed vsync support.
GetVSyncParameters gets called before a swap happens and you can pass the
refresh rate and time between consecutive refreshes. This could also be used
to ensure that we flush the Wayland display after every swap. Now, We PostTask
to the current MessageLoop to schedule a flush immediately after the swap
happens.
DisplayPollthread: Poll only for reading Wayland events.

We now ensure that Wayland display is flushed every frame. We don't have to do
that anymore in pollthread. Now, DisplayPollthread only reads any pending events
coming from Wayland compositor and dispatches them.
Cleanup: Remove obsolete code related to frame callbacks.

We have lot of code related to display queue and frame callbacks to ensure that
display was flushed properly. This code was never used and also is obsolete now
as we have a proper mechanism to flush display.
wayland: Implement HandlePopupDone callback for dispatching close window

Now if a menu is opened and the user clicks outside a Chromium window then the
popup done event will dispatch a close window for that menu.
Gardening: Fix popups.

Popups get closed automatically after being focussed for a short duration. This
was as a result of recent changes in WaylandDisplayPollThread. Looks like we need
to call flush after dispatch in WaylandDisplayPollThread. This doesn't cause any
regression and fixes popups. So, reverting these changes.
Gardening: Update to latest revision.

Effecting CL: https://codereview.chromium.org/140593002
Gardening: Update to LKGR.

With the recent update, Chromium browser has become unusable. Any thing which
results in clipboard/textfield usage results in a DCHECK failure (i.e. auto-
complete, text selection).

More data can be found here:
https://github.com/01org/ozone-wayland/issues/113#issuecomment-33330722
Release Wayland surface when WaylandSyncProvider is destroyed.

Currently, we send an IPC message to destroy EGLWindow. We make all the effort
to ensure that this is sent after the associated GLSurface is destroyed.
We could use WaylandSyncProvider to track the lifetime of GLSurface and make
sure EGLWindow is destroyed as soon as GLSurface is destroyed. This removes
the need for an IPC call and also ensure the EGLWindow is destroyed as soon
as GLSurface is destroyed. This also fixes a rendering issue with popups.

Fixes #184 #187
Gardening: Update to latest revision.

Effecting CL: https://codereview.chromium.org/140593002
Events: Use EventConverterOzoneWayland to notify native output events.

We use EventConverterOzoneWayland to notify all native events coming from
Wayland to Aura. Output related events violate this and are sent directly to
OzoneDisplay. With this CL, we use EventConverterOzoneWayland to notify output
related events too. This change unifies the way native events are handled,
dispatched to various observers and removes un-necessary friend class
declaration in OzoneDisplay.
OzoneDisplay: Make OzoneProcessObserver inherit DestructionObserver.

Currently, OzoneDisplay inherits MessageLoop::DestructionObserver and informs
OzoneProcessObserver whenever MessageLoop is destroyed. This CL, changes it
so that OzoneProcessObserver inherits MessageLoop::DestructionObserver and gets
notified directly instead of OzoneDisplay having to do this.
OzoneDisplay: Remove SetWindowChangeObserver API.

WindowTreeHostDelegateWayland registers itself as WindowChangeObserver via
OzoneDisplay. This seems un-necessary as WindowTreeHostDelegateWayland can
do this directly via EventConverterOzoneWayland. This CL makes necessary
changes for this.

Fixes #186
OzoneDisplay: Move Window constants to a separate header.

WindowState and type are defined in OzoneDisplay. Moving these to a separate
header helps in explicitly defining the WindowType and state in IPC Messages.
This CL makes changes in this direction.
DRWH: Introduce interface for handling window state change events.

EventConverter handles native events coming from Wayland and dispatches them to
Aura. We need something similar to handle the case where Aura needs to send
native events(i.e. Creating Window, changing it's state etc) to Wayland. We
already have the code which does this but needs some re-arrangement. This CL
introduces WindowStateChangeHandler interface. The actual implementations will
be done in follow up CL.
WaylandDisplay and ODChannelHost to inherit WindowStateChangeHandler.

WindowState notifications need to be sent over IPC in multi process case and
handled in-process in single process case. OzoneDisplayChannelHost implements
WindowStateChangeHandler interface and sends any window state change
notifications over IPC (as it does now). WaylandDisplay implements
WindowStateChangeHandle interface and adds necessary support to handle the
events in GPU (multi-process case) or in Browser process (single-process case).
Take WindowStateChangeHandler into use.

This CL replaces the usage of OzoneDisplay SetWidget* APIS with the ones
introduced by WindowStateChangeHandler.
WindowStateChangeHandler: Remove all unused API in OzoneDisplay.

This CL removes all unused API in OzoneDisplay and DisplayChannelHost. All
these API have been replaced by WindowStateChangeHandler interface.
Style: Fix indentation.
Gardening: Update to latest revision.
OzoneDisplayChannelHost: Add support for observing ChildProcessHost.

This CL adds necessary support in OzoneDisplayChannelHost to observe for new
child process host connections. We rely on this to establish a Channel Connection.
We already have similar support in OzoneChildProcessObserver class, but it seems
un-necessary as this information is very much internal to OzoneDisplayChannelHost.
OzoneChildProcessObserver will be removed in a follow up patch.